This is the first in a series of three blog posts.
Google Public DNS and OpenDNS are free DNS resolvers that anybody can use on their computer to resolve a hostname (www.example.com) to an IP address. Google and OpenDNS promise faster and safer DNS lookups and each serves billions of DNS queries every month.
It has been blogged about before that using these DNS resolvers can cause (big) problems when requesting content from CDNs, because some CDNs detect the user's location wrong and serve content from far-away servers.
We decided to investigate if this problem still exists, and if so how big the problem is. We will answer the following 3 questions:
- How many people use Google DNS and OpenDNS?
- Which CDNs support edns client subnet?
- Is real-world CDN performance different for Google DNS and OpenDNS users?
We answer the first question in this article and the others in separate blog posts, which we hope to publish tomorrow and the day after tomorrow. Please be patient. The good stuff on CDN performance is coming ...
How many people use Google DNS and OpenDNS?
Between Oct 3 and Oct 15 2012 we ran over 3.5 million tests from around the world.
The key findings are:
- 8.04% of users worldwide use either Google DNS or OpenDNS
- Google DNS has 2.5 times more users than OpenDNS
- Popularity of these DNS services varies greatly by country
- Google DNS is very popular in Vietnam, Indonesia, Turkey and Egypt
The chart below shows the 'market share' of the two DNS services in 10 large countries. China is not shown because we had a relatively small number of measurements from China.
Just by looking at these 10 countries you can see the big differences. Canada is the only country where OpenDNS is used by more people than Google DNS. United Kingdom and Australia are pretty similar, usage of bot public DNS services is relatively low in France, but high in Russia and Brazil. In India and especially Indonesia, both DNS services are used by a lot of people. View the table below to gain insight in Google Public DNS and OpenDNS usage/popularity for the 80 countries and states (US/CA) that we received most test results from.
|Country/state||Count||Using OpenDNS||Using Google DNS||Using OpenDNS or Google|
|United States (California)||262,210||5,688||2.17%||9,527||3.63%||15,215||5.80%|
|United States (Texas)||69,494||1,650||2.37%||1,895||2.73%||3,545||5.10%|
|United States (New York)||61,482||1,647||2.68%||1,861||3.03%||3,508||5.71%|
We will continue our DNS tests and likely publish an update to this blog post in the future.
Our friend at CDNetworks, Junho Choi (CTO), wrote a good, relevant article - Analyzing The Performance Impact of edns-client-subnet on CDN: Part 1 - that includes recent data (Aug, 2014) about how many people use Google DNS and OpenDNS.
Sajal used the following setup:
- RUM.js. Added a few lines of code to this JS file, to send request to a random hostname for which our DNS server is the authoritative name server
- HTTP server (Nginx). Returns a 204 response to all requests. Uploads logfiles to S3 every hour
- Node.js based DNS server. Uses the excellent native-dns library. Gives same response with very low TTL to all queries. Echoes back the client-subnet (if any) with scope netmask of 32. Uploads logfiles to S3 every hour
- Desktop. Offline analysis after downloading logfiles from S3. Using MongoDB for storage, Disco for parallel processing
The HTTP server and DNS server ran on an EC2 instance in US-East.
The first step is to get the user's IP and their resolver's IP
- User tries to access http://<uuid>.example.com/foo.jpg
- User asks for the IP of <uuid>.example.com from the resolver configured in the user's machine
- The configured resolver asks our authoritative DNS server. We log the IP of resolver and the uuid here. Also log EDNS parameters if available
- User finally establishes HTTP connection to <uuid>.example.com. We log the IP of the user and the uuid
- Match users IP to resolver IP where uuid matches
Each user's IP was considered only once a day !
Step two is to match ASNs, country, etc.
We detected the ASN of the DNS resolver's IP and user's IP and then detected geo location of the user, geo location of the dns server, whether edns was used or not, the edns paramaters that came with the query and user agent. If the ASN matched Google Public DNS or OpenDNS, we used information on these webpages (Google DNS server locations, OpenDNS network map) to figure out its location.