Think you're getting faster performance by using Google DNS or OpenDNS? Think again -- especially if you're outside the US.
A post at TUAW today recommends you change your DNS provider for faster performance. If you are located outside the US -- like I am, and like most APC readers are -- this is a bad idea. I only discovered why after experiencing slow download speeds for several months.
Like other tech enthusiasts, I jumped on the opportunity to switch my computer's domain name server settings away from my ISP's defaults to -- I assumed -- the much larger and faster Google DNS servers at 8.8.8.8 and 8.8.4.4 when they were first announced.
If you're not familiar with what exactly DNS servers do, they translate the web address you type into your browser into the actual IP address of the internet server you're connecting to at the other end. For example, a DNS server will convert "apcmag.com" typed into your browser address bar into "125.7.5.1", which is the IP address of our server at Macquarie Telecom's datacentre.
DNS servers can be one cause (among many) of slowness in your web browsing, if your ISP's DNS server is overloaded and responding slowly -- you may experience a delay of seconds each time you go to a web address that your computer hasn't seen recently (and therefore has to connect to a DNS server to find out the correlating IP address).
This is one of the problems that third-party public DNS providers like Google DNS and OpenDNS are supposed to fix -- faster, more reliable lookups.
However, it was Simon Hackett, CEO of Internode, who I bumped into at a function who warned me off using third party DNS servers located overseas, such as Google DNS or OpenDNS. (By the way, if I've got any of the technical details wrong in this article, it's much more likely to be my fault than Simon's...!)
The key reason they're bad is that they stuff up your computer's ability to find the closest Akamai server to you. Akamai is the worldwide system which places massive file servers inside ISP data centres worldwide -- so that when you download a big file like a Windows or Mac OS X update, or a TV show or movie from iTunes, it downloads from a server that's very close to you, and therefore pumps down your line as fast as your ADSL2+ can handle. (The primary selling point of Akamai is that it avoids server overload when everyone tries to download something at once, but a secondary selling point is that you're downloading a file from a local server inside your ISP or at least in your country, so that the trip between the file server and you is as short/fast as possible.)
If you use a US-based DNS server, your closest Akamai cache will instead be chosen as being in the US, and you'll get crummy download speeds as your file trickles over the international link.
In my case, this meant that iTunes downloads were coming down at a couple of hundred kilobytes per second, rather than the 1.9MB/s I was accustomed to before I changed my DNS servers to Google DNS and OpenDNS.
Don't get me wrong -- there are some distinct advantages to using reliable servers from companies that specialise in providing DNS, like much faster refresh of their DNS records when new domains are registered, or websites change their IP addresses, DNS-level blocking of known phishing sites and so on.
But when they claim you'll get faster speed by using them, they're conveniently forgetting to mention that if you're not located in the US, they could badly slow down your speed when downloading from distributed caches like Akamai.
Admittedly, part of the problem is the design of Akamai -- it is, to an extent, a 'hack' of the DNS system (not in the illegal sense; but in the sense that they're using the DNS system in a way it was not quite designed for initially.) I have contacted Akamai's senior PR people twice and asked if they're investigating any way of mitigating the problem when people use DNS servers outside their local geography, but I haven't heard back.
Of course, if Google DNS, OpenDNS or other public DNS providers put servers into Australia, the problem would be largely gone. But until they do, my advice is to stick with the DNS provided by your ISP. To their credit, OpenDNS is reasonably up-front about this problem (though it's not something they advertise on their homepage, so most users wouldn't be aware of it.)
UPDATE: Phil Sweeney from Whirlpool reminded me that using a third-party DNS service can also screw up your ISP's quota free downloads. For example, iiNet provides unmetered downloads from Apple's iTunes Store, which is great if you like to buy TV series and rent/buy movies on iTunes. However, if you change your DNS to OpenDNS or Google DNS, you'll be pulling the content from an Akamai server overseas, rather than the one in iiNet's network that is designated for free downloads. As a result, you will be charged for those downloads. - source