Google Fiber DNS: Cloudflare vs Google05 August 2023
My home has recently been connected to Google Fiber. I'd been looking forward to this for awhile. Finally, faster upload speeds!
Google Fiber pitches itself as the "Fastest internet provider in the country.". They are offering 5 and 8 Gigabit fiber connections in some places, which is not the highest capacity out there, but still very good. Also, it will always be Internet to me.
Quick aside, all of this kinda blows my mind. I don't think I would have believed you if you had told me in the 1990s that this is how things would have turned out. Back when I was still dreaming about the idea of somehow having a T1 line( 1.5 Mbps ) at home. Now we've since sailed past even a T3 line ( 44 Mbps ).
This being a Google service, it was no surprise to see that DNS pointed to their public 18.104.22.168 DNS service by default. My naive assumption was that the Google 22.214.171.124 DNS service was going to be the fastest option with a Google Fiber connection. Google Fiber + Google DNS, how could that not be the fastest combination?
A funny thing about obvious conclusions, some times they are wrong.
A big pipe, with low latency, is the foundation of having a "fast" Internet connection. My new 5 Gbps fiber certainly takes care of that.
A major service for actually using the Internet is DNS. For most people DNS is being used constantly, generally invisible, in the background. Before you can connect to another host on the Internet your system uses DNS to translate a host name ( like wordpress.com ) to an IP address ( like 126.96.36.199 ). A slow DNS service means those lookups take longer, and they happen while trying to connect to another machine.
There is plenty more to understanding how DNS works, but for the sake of simplicity, all other things being equal: a faster DNS service is better than a slower one. A slow ( or even worse, broken ) DNS service can make it look like your network connection is slow or broken. Google DNS documentation has a section on why DNS latency is important to performance.
To test the latency between my home and 188.8.131.52 I ran ping test from a wired connection.
$ ping -4 -n -c 10 184.108.40.206 PING 220.127.116.11 (18.104.22.168) 56(84) bytes of data. 64 bytes from 22.214.171.124: icmp_seq=1 ttl=57 time=19.5 ms 64 bytes from 126.96.36.199: icmp_seq=2 ttl=57 time=19.4 ms 64 bytes from 188.8.131.52: icmp_seq=3 ttl=57 time=19.3 ms 64 bytes from 184.108.40.206: icmp_seq=4 ttl=57 time=19.4 ms 64 bytes from 220.127.116.11: icmp_seq=5 ttl=57 time=19.4 ms 64 bytes from 18.104.22.168: icmp_seq=6 ttl=57 time=19.4 ms 64 bytes from 22.214.171.124: icmp_seq=7 ttl=57 time=19.4 ms 64 bytes from 126.96.36.199: icmp_seq=8 ttl=57 time=19.4 ms 64 bytes from 188.8.131.52: icmp_seq=9 ttl=57 time=19.4 ms 64 bytes from 184.108.40.206: icmp_seq=10 ttl=57 time=19.4 ms --- 220.127.116.11 ping statistics --- 10 packets transmitted, 10 received, 0% packet loss, time 18ms rtt min/avg/max/mdev = 19.332/19.406/19.525/0.183 ms $ traceroute -4 -n 18.104.22.168 traceroute to 22.214.171.124 (126.96.36.199), 30 hops max, 60 byte packets 1 192.168.1.1 0.493 ms 0.533 ms 0.513 ms 2 * * * 3 * * * 4 188.8.131.52 2.748 ms 2.173 ms 2.713 ms 5 184.108.40.206 20.278 ms 20.260 ms 20.240 ms 6 * * * 7 220.127.116.11 19.751 ms 19.452 ms 19.467 ms
It did well in terms of consistency, but was 19 ms really a good result for the network latency to the DNS server? That was higher than I expected.
Next I tried another very popular public DNS service, Cloudflare's 18.104.22.168.
$ ping -4 -n -c 10 22.214.171.124 PING 126.96.36.199 (188.8.131.52) 56(84) bytes of data. 64 bytes from 184.108.40.206: icmp_seq=1 ttl=59 time=2.00 ms 64 bytes from 220.127.116.11: icmp_seq=2 ttl=59 time=1.83 ms 64 bytes from 18.104.22.168: icmp_seq=3 ttl=59 time=2.06 ms 64 bytes from 22.214.171.124: icmp_seq=4 ttl=59 time=2.05 ms 64 bytes from 126.96.36.199: icmp_seq=5 ttl=59 time=2.03 ms 64 bytes from 188.8.131.52: icmp_seq=6 ttl=59 time=2.55 ms 64 bytes from 184.108.40.206: icmp_seq=7 ttl=59 time=2.07 ms 64 bytes from 220.127.116.11: icmp_seq=8 ttl=59 time=1.93 ms 64 bytes from 18.104.22.168: icmp_seq=9 ttl=59 time=1.92 ms 64 bytes from 22.214.171.124: icmp_seq=10 ttl=59 time=2.08 ms --- 126.96.36.199 ping statistics --- 10 packets transmitted, 10 received, 0% packet loss, time 18ms rtt min/avg/max/mdev = 1.832/2.052/2.552/0.191 ms $ traceroute -4 -n 188.8.131.52 traceroute to 184.108.40.206 (220.127.116.11), 30 hops max, 60 byte packets 1 192.168.1.1 0.324 ms 0.355 ms 0.338 ms 2 * * * 3 * * * 4 18.104.22.168 2.418 ms 2.493 ms 2.475 ms 5 22.214.171.124 2.909 ms 3.426 ms 3.311 ms 6 126.96.36.199 2.392 ms 2.302 ms 2.246 ms
I did not expect to see a 17 ms difference here. To make it even more extreme, the Google DNS latency is 9X slower than the Cloudflare DNS latency. This is of course only from my house, and this might be a unique situation.
Ping only tries to measure what is happening at the network level. I ran a few DNS queries using
dig against 188.8.131.52 and 184.108.40.206, to see if there was any additional overhead for the actual DNS work.
|Service||Cached Response Time||Uncached Response Time|
|220.127.116.11||35 ms||35 ms|
|18.104.22.168||4 ms||39 ms|
I didn't notice any change in the Google times, even though I was using made up host names, that were very unlikely to ever have been requested. Google DNS seems to hover around 35 ms for each DNS request, cached or not. There was some varying in cached times for both, the times listed above were by far the most common values.
It seems clear that 22.214.171.124 is being backhauled from Utah to another state. While the 126.96.36.199 responding server was in Salt Lake City, Utah. Google Cloud has a Salt Lake City location, so I had a sliver of hope that this would have turned out better.
Given these differences I've switched to using 188.8.131.52 instead of the default 184.108.40.206 as my upstream DNS resolver.
While digging around I found a few other things that were new to me.
slix.net - which appears to be the main IX in SLC. Both Google and Microsoft have 200 Gbps connections there.
dns.google - a public site for doing DNS queries with Google 220.127.116.11. Also supports cache flushing, which is interesting to see ( wonder how much abuse that gets ). This has been around since at least mid-2019. I'm surprised I have't come across it before