zerosleeps

Since 2010

DNS and CDN

Let’s start with a problem: the latest iPhone software update was going to take an estimated 6 hours to download here in Sydney. By undoing a “performance” tweak I had made on my network, it downloaded in about 12 minutes.

Before I reveal the solution, let’s talk about those acronyms in the post title.

DNS

Okay, so Domain Name System (DNS) is like a phone book for the internet. When you type “zerosleeps.com” into your browser, there’s a little magic going on behind the scenes. Your computer or router will ask your DNS service for the IP address associated with zerosleeps.com, and DNS will respond accordingly, spitting out something nasty like “65.39.205.54”.

Now you might be able to remember “65.39.205.54”, but what about remembering that, and Google’s IP address, and BBC News, and Daring Fireball, and…? And with the deployment of IPv6 it would only get worse, with IP addresses of “2001:4860:0:1001::68”.

That’s why DNS was invented.

CDN

Right, what about Content Delivery Networks (CDNs)? Well these puppies are used to help deliver content to internet users worldwide. Now zerosleeps.com is hosted on one server, somewhere in the USA, and that’s just fine given the volume of traffic received. But take a service like the iTunes Store, which simultaneously delivers massive amounts of data to tens of thousands of users worldwide? CDNs help with this problem by storing the same data in lots of different geographic locations, and try to serve that data to users from the closest of those locations. That means that global network traffic is decreased, because instead of downloading that movie from Apple’s servers in California, there’s a good chance you’ll end up being served by a data centre much closer to home. It also means you’ll be watching the movie much faster.

So what’s my beef with all of this? Well there are oodles of DNS servers out there, all keeping themselves synchronised with each other so that when a new website comes online or moves, within minutes you’ll be able to access it without knowing or caring what that new site’s IP address is. For the vast majority of home internet users, the DNS service you use is your internet service provider’s (ISP) own service. Sometimes, ISP’s DNS services can be a bit slow, or out-of-date, or unreliable, so geeks like me can tweak our network settings and tell our computers to use a much chunkier DNS solution, such as the one provided by OpenDNS.

However, because OpenDNS don’t have any servers located in Australia, I end up being dealt with by a DNS service located in the USA or Singapore or somewhere. What this means is that when I request data from a CDN (i.e. buy a movie in iTunes), the CDN thinks I’m in the USA or Singapore, and directs my computer towards an iTunes server somewhere around there. See how everything is coming together now? Although OpenDNS provides me with faster DNS lookups than my own ISP, what actually happens on the rare occasion that my computer requests data from a CDN is that I end up with slower data transfers.

The solution? Well the simplest thing to do is for geeks like me to put more faith in our geographically-correct ISP DNS service.

A letter to Australian television broadcasters

Dear Australian television broadcasters,

I can only imagine the process of preparing a television show for transmission, but I am almost entirely confident that some time prior to showing a pre-recorded show you know exactly how long - to a precision of seconds - each show lasts.

I am also somewhat confident that you know how long each commercial you plan to transmit runs for.

By using simple arithmetic, it is relatively straightforward to add up all these durations, and determine to a very high degree of accuracy how long each broadcast will last.

Granted there are complications caused by minutes consisting of 60 seconds, and hours being made up of 60 minutes, however these obstacles can be overcome and calculations can be performed which tell you that if The X Factor runs for 98 minutes, and you have sold 20 minutes of commercials, the total length of that broadcast will be one hour and 58 minutes. Add in two minutes of self-promotion, and you have a two hour broadcast.

Armed with this information, you can in turn tell viewers in advance that the show following The X Factor will start exactly two hours after The X Factor begins.

You can see that if we continue this chain, you can quickly and easily create an accurate daily schedule of television goodness.

I do hope that this information will be of some use in the future. Perhaps even one day you’ll be able to eliminate the vast amount of bollocks you seem to put into your viewing schedules at the moment.

Kind regards, Scott.

On the move

Sydney city from my office

It’s a smidgen over 18 months since I arrived in Sydney, and it’s been decided that it’s time to stop living with someone else’s furniture and buy our own stuff. So that’s exactly what happened starting about three weeks ago.

An unfurnished unit in the building we’ve lived in since we got here came up for rent, so we took it, went shopping, and are in the process of moving our stuff across the hall from one apartment to the other. Literally across the hall! It’s not as daft as it sounds because we like the building and the location, and the new unit faces in toward a garden in the middle of the building, rather than out onto a noisy road. So there’s that.

The furniture-picked-and-bought-by-us is another obvious plus, and there’s also this business of making our minds up. Maybe now we have all our own stuff, set out the way we want, it’ll feel much more like home and help us feel more settled here in Sydney?

Anyway, that’s what’s happening just now. I’m a bit unsure about posting photos of the place I live on the Intertubes, so here’s a photo of the view from my office instead. Not bad eh? ;-)

Everything else is secondary

Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma, which is living with the results of other people’s thinking. Don’t let the noise of others’ opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.

Steve Jobs, 12th June 2005.

zerosleeps 2.0

You smell that? That’s the smell of fresh pixels.

For those of you with eagle-like vision, you’ll already have spotted that zerosleeps doesn’t quite look the same as it did a couple of months ago. If I’ve done things right though, it shouldn’t look drastically different.

So what exactly has changed then? Well the site is now running on a completely different publishing platform, which gives me complete control over every aspect of what you see (and what you don’t see). For a geek-cum-web-developer like me, that’s a big advantage. Web standards and accessibility are also important to me, and the last platform hosting zerosleeps just didn’t cut the mustard when it came to that kind of stuff. And there was nothing I could do about it either.

The photo galleries in the old pad were also starting to bug me. It didn’t make much sense given the content of this site to write an article, create a photo gallery, and then link one to the other. Now I can combine photos and articles into one thing.

Comments have been disabled. They just weren’t adding anything to the site, and were actually starting to become a pain to moderate: as with all things online, spam comments were by far outweighing actual reader comments.

Still to do: well as I mentioned I’m much happier with photo galleries now, but I’m still not entirely convinced about having each photo open in it’s own page. It feels a bit cumbersome, and navigating from one photo to the next isn’t as intuitive as I’d like it to be. I’m going to try to implement one of those JavaScript light-box things, where photos pop-up over the top of the current page.

So, here we are. New platform, same(ish) look and feel, 100% HTML and CSS compliant, fully accessible, and sans “.com”. That’s right, it’s just “zerosleeps” now, not “zerosleeps.com”. I mean, obviously the URL is still zerosleeps.com, but from this point forward I’m going to refer to this little corner of the intertubes as just zerosleeps.

Welcome. Make yourself at home.