Guest blog post by Mehmet Akcin, Service Strategist and Architect.
In May 2017, we published an update to this post with more recent latency measurements — read the most up-to-date post on this topic here.
As a DNS geek it’s probably normal to expect that I am not going to just use the recursive resolvers my ISP assigns via DHCP. Why? Because I want DNSSEC validation or sometimes I simply want non-government filtered results, you know? I have used many different recursive DNS providers such as Dyn, Comodo, FreeDNS, Level3, Google, OpenDNS, Neustar, OpenNIC, and SafeDNS.
Testing Public DNS Provider Latency
In this post, we’ll look at the performance for some of these public DNS providers from nearly 600 unique locations in 52 countries for one month. There are various factors that impact the performance of a recursive server. These include its actual load, available network capacity, latency to root, TLD, and authoritative name servers. DNS latency includes both latency from the user to the resolver and, in the case of cache misses, from the resolver to the authoritative name server. In our tests we are focusing on cached queries, measuring latency from simulated users to each resolver.
I chose 9 most commonly used public DNS providers to test. To generate the data set, we make a request each hour from 550 vantage points in 280 Autonomous Systems around the world to each DNS provider. See my previous post on Comparing DNS Root Server Performance for an in-depth account of the methodology. Each vantage point measures the latency between it and the nearest recursive resolver (using Anycast) for each public DNS provider. This generates approximately 400,000 performance data points over a month for each public DNS provider.
Global Coverage, Global Speed
Let’s first take a look at who is the fastest provider out there from all global locations. You can take a look at all of the graphs by country and provider here (April 2015). Figure 1 shows latency over the course of a month and Figure 2 shows the global averages.
When we look per continent, results are not much different as well (Figure 3). Google is clearly leading the public DNS space, and has by far the lowest latency in South America, Asia and Africa. North America and Europe are a much closer contest, with variance by region and country.
These rankings are similar to previous comparisons of public DNS providers, showing that OpenDNS is generally fastest in North America and Google in South America and Asia. In Africa, we find that Google is now faster than OpenDNS. In Europe, performance differs significantly by country (Figure 4).
What Determines Latency for Public DNS Services?
So why does latency vary so much by provider and country? It’s not just the quantity and location of data centers; each of the major providers I tested had 15-30 locations (Figure 5). And Google, the fastest overall and in many remote and developing countries only serves queries from 18 global locations.
First, routing can have a large impact on latencies. The geographically nearest DNS resolver may not be the nearest one when routing connections and preferences are considered. As each of the major providers use Anycast, sometimes actual paths have a higher latency. For example, in Figures 6 and 7, Google DNS requests from Orlando is served in Miami but requests from San Jose, Costa Rica are served from Chicago, after traveling through Miami. That’s because routers select BGP anycast routes based on policy first, not geographic proximity.
Second, some of the providers do additional caching of their results. This is the reason Google is so fast in South Africa and Australia, for example. Google does not have data centers in either country, while some other providers do. Google does do edge caching in their 50+ global POPs as well as ISP and access networks in many countries, leading to lower latencies (Figure 8).
Third, the landscape of public DNS servers is constantly changing. As an example, during our testing period OpenDNS opened a new Johannesburg data center. As you can see in Figure 9, latency dropped by 80% in South Africa after this new server started operating in April.
So just because a provider has a nearby data center does not make them the fastest or most reliable service. Routing, caching and infrastructure changes affect latency.
Finding the Fastest Public DNS from Your Location
Testing this out on your own is easy. Target IP addresses for the services you care about.
Use a nearby vantage point or install one within your own network to get even more specific results. That way you can understand how geographic distance and routing affect performance to your site. Get started today with a free trial of ThousandEyes.