Proximity of the name server to the users location plays a very important role in DNS lookup speed. Proximity reduces the number of hops that take place while the DNS packets are routed. This is the reason why several large DNS providers like CloudFlare, Dynect and DNSMadeEasy have adopted IP Anycast. Anycast routes the requests to the nearest name server and with name servers located around the world, the DNS lookup speed for visitors even in foreign countries is quite fast.
However, our data shows that there may be several other factors that affect DNS lookup speed, like the kind of DNS server used, or the kind of network the server is on. Note that of all countries in Asia, Japan has the fastest DNS lookup speed. Read more about this in this blog post. Why is that? This is definitely not because of proximity. Its probably just because the internet infrastructure of Japan is more robust and fast.
Our server is located in Los Angeles, very close to the bay area which most companies use as a data center location. However, surprisingly, our analysis of 700,000 name servers shows that name servers in California are not the fastest!
The table below shows a list of states, the number of name servers in that state and the average speed with which name servers in that state respond to DNS lookups. The data used are the logs of all DNS lookups in December 2012.
|State||Average Speed in milliseconds||Number of Name Servers||Approximate Distance|
|North Carolina||90.68||3343||2648 miles|
Why is Virginia the fastest and Illinois the slowest? I have absolutely no idea! There does not appear to be a strong correlation between proximity and speed (at least within the same country).
A user on ServerFault gave a simple formula to calculate the DNS speed based on location (I am not sure how reliable this is but wanted to mention it anyways).
Speed in ms = X / 50
Where X = distance in kilometers. Going by this formula, the speed to Virginia should be 85.28 milliseconds (about right) and the speed to Utah should be 25.28 milliseconds. Why then this very large discrepancy in the average speed to Utah? Why is the speed to Utah much higher than the speed to Virginia even if the distance is almost 3 times less? Why is the latency within California much higher than Virginia?
For DNS speeds below 10 ms, I don’t think a factory default Bind installation will work even if the name server is located in the same city (which you can clearly see in our rankings. There are several providers who have a point of presence in Los Angeles and are not fast enough). If you have worked with databases or key-value stores like HBase, you know that a typical look up takes about 10 ms (not including external network latencies). It takes a lot of effort to get a DNS speed below 10 ms which the top three have obtained.
So how much is proximity and geographical location important? I think you should be fine if you have a name server in countries (or nearby countries) from which you get the most number of visitors.
Follow me on Twitter @SolveDNS