Digitalocean, Linode DNS vs Cloudflare DNS
In the past I used my VPS provider’s DNS server. Now I switched to Cloudflare’s free DNS server (without enabling Cloudflare’s other services) and I got a decrease of 100ms. If you’re in a rush, skip the introduction and look at the fancy graphs to become convinced 🙂
If you are hosting your sites on a VPS (let’s say Digitalocean or Linode), chances are high that you use their (free) DNS servers. But did you asked yourself if that’s the fastest solution? You choosed for a VPS to get the fastest load time after all. And the first step for a visitor’s computer is to look up the IP via a DNS server. We can’t deny it: we can finetune our website as hard as we can, but DNS lookup is something out of our reach.
We will discuss these providers today:
And some base references:
Let’s crunch some data
I did some manual tests but I realised that DNS cache, network load and some other factors would affect my comparison. So I found this site: Source, which has the most accurate comparison I could find. I filtered out the data that was relevant four this post:
We can see that Digitalocean and Linode have an awful slow DNS response: 100+ms… After spending hours of tweaking the caching and various other settings on my VPS, this slaps me in the face hard. Cloudflare comes out as the winner with a response time of 10ms. Well the obvious thing to do would be switching over to Cloudflare. But we know that Cloudflare suffered from some downtime in the past because of big DDos attacks. Let’s check the uptime to clear this up:
Well, the uptime winner is Digitalocean (wordpress.com is paid unfortunately). But Cloudflare is 0.02% behind. Doesn’t seem much, but still 7 days/year more downtime than Digitalocean. WOW, wait a minute: that’s bullsh*t! Indeed. You have to put these tests in perspective.
For each provider every NS for a single domain is queried and if all servers responded successfully a value of 100 is stored. For every NS that fails the percentage that it represents is then subtracted from 100 and stored. For example if a provider has 4 NS and 1 fails then a value of 75 is stored. If 3 fail then a value of 25 is stored. The average for 30 days is then displayed here.
This means even though the provider is marked as down a real user could still get an answer thanks to the round robin algorithm used by DNS.
Do not use these charts to make serious decisions as they do not represent the real uptime of a provider. Its more of a “Quality” test that is completely objective.
To use only the DNS of Cloudflare, make sure that you select this:
We went trough the data and we can conclude the following:
Cloudflare is an interesting option to consider for reducing the load-time of your website. You can get a 100ms decrease in loadtime, which is awesome. There is possibly less uptime of the cloudflare DNS servers, but if you are really paranoid about that, you can use the 2 DNS servers from Cloudflare for your website, and add a third one which is from your VPS provider.