Why the number and location of nameservers matter

By Morten Møller Riis

January 31 2011 12:00 CET

At DNSapp.net we run 5 independent nameservers at different locations. This ensures no single-point-of-failure (SPOF) and also decreases the response time to the end-user.

When you connect to the internet via your ISP (Internet Service Provider) you are most likely using their DNS forwarders. In short DNS forwarders are aware of the other nameservers on the internet and forward your request.

Say you want to resolve google.com and ask your DNS forwarder. It then asks the root servers (a.root-servers.net, b.root-servers.net etc.). If the root nameservers don’t have anything cached for the domain (though highly unlikely in this example) it will return a delegation. This means that the root servers say they do not know anything about that domain but you can query the GTLD servers (a.gtld-servers.net etc.). The GTLD nameservers in-turn point you to the authoritative nameservers (ns1.google.com, ns2.google.com, etc.). One of these servers will then resolve the domain to the IP or whatever you requested.

All the while the DNS forwarder stores the time it takes to do the lookups. So if ns1.google.com answers the query in 20ms but ns2.google.com answers in 10ms then the DNS forwarder will remember this and prefer ns2.google.com. It will not completely ignore ns1.google.com but most of the request will be send to ns2.google.com. Likewise if one of the nameservers are unresponsive.

Now, if our nameservers were only located in one location this would not have much effect on the result. Let’s say you query 2 servers located in Europe from the US. Both will have relatively high response time.

Say now that one of the nameservers was located in the US. Now the response time of that server will be way faster and the DNS forwarder will therefore prefer that server. Suddenly we have reduced the DNS query time and your users will definitely feel the difference.