Skip to content

Comment on Google Public DNS

Comments

One of the problems with using 'public' DNS servers like Google and OpenDNS is that content delivery networks return the IPs of their nodes that are closest to your DNS servers based on the assumption that you are on the same network as your DNS servers.

I just did a comparison and I am 10ms away from the Akamai node returned by my ISP's DNS servers, 88ms away from the node returned by Google Public DNS, and 20ms away from the node returned by OpenDNS. Even if DNS is faster, it may make everything else slower...

That may be true...

but I am willing to sacrifice a few hundred ms to avoid the several seconds of frustration when typing 'gmail' into the firefox address bar gets me redirected to some stupid ass ISP specific SERPs page =D

Do you have any idea how confused I was the first time that happened? An absolutely terrible user experience.

The other alternative is to just run your own instance of bind (or dnscache if that's what you prefer). CDN content will usually perform better, but non-CDN content will often lose a few ms because you usually won't have very much in cache. As a bonus, you can perform some stupid LAN tricks.

Google could fix that by setting up relationships with the big CDNs so that they could resolve to the closest locations for you.

Google is one of the biggest CDNs, so maybe they'll start doing that on their own.

Anycast mitigates this several ways.

First, modern CDN's can use anycast (example bitgravity) to control in detail which content server a given user connects too. Second, a CDN operator can anycast it's authority servers to minimize time spent in recursive dns lookups (I believe akamai uses a combination similar to this).

Alternately, a 3rd party dns operator can use anycast to control which resolver a given user uses, ensuring that the resolver is close to the user on the internet. Since google's nameservers are associated with hostnames of the form any-in-XXXX.1e100.net I'd assume they're anycast already or will be in the future.

if on windows how do I measure what you just measured?

Open a command prompt, launch nslookup to do the DNS queries. Once nslookup type server <ip> in the console to switch dns provider, and then just type the host name to have it looked up.

Use a second window to ping the resulting ip addresses.

edit: these instructions are also valid on linux/freebsd and should also work on OSX

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.