Recent Post

Categories

Archives

Cow Computing

09 Dec 4

Google Public DNS Benchmarking

Well, Google finally realizes the important of participating in the DNS service. Not only can this service help boosting its earning and status in the web business, but it can also give Google the ability to control user’s networking (e.g. browsing) behavior.

Normally, a user knows nothing about DNS and it’s taken care by the ISP. Whenever we type a domain name in the browser, it will in fact send an request to the DNS resolver to do the look up, and return the destination IP for fetching the website.To know more, do visit HERE.

DNS as an infrastructure, it does affect the internet speed and speed matters. Thus, there are OpenDNS, and now the Google Public DNS. But do becareful when you are deciding whether to switch over to Google from your current DNS, as it does not actually guarantee a positive improvement in speed (at least this is the case for me).

In order to use Google Public DNS, set your DNS to either one of the (8.8.8.8 or 8.8.4.4), or set them both for primary dns and secondary dns. (for detail of how to set it, visit HERE)

I have indeed written a simple benchmarking script to compare Google’s DNS to Hong Kong’s ISP DNS.
Here’s the result of Google vs Hong Kong’s ISP(s) DNS

DNS\Domain yahoo.com bing.com twitter.com facebook.com google.com youtube.com
Google Public DNS 24 27 26 24 27 28
PCCW 4 71 3 3 3 25
HKBN 4 3 4 3 3 3
HGC 4 74 4 3 7 4
i-Cable 4 74 9 4 28 4

(*red indicates the slowest)

As you can see, most DNS resolved by Google Public DNS are slower when compared to those from ISP. We can learn that, at least in Hong Kong, Google Public DNS is not preferred .

You might want to grab the script and have a test on your current DNS setting compared to Google’s. Here’s the Benchmarking Script, GDNSBenchmark.sh

#!/bin/sh
for dns in 8.8.8.8 $1; do
    echo DNS: $dns >> result.txt
    for site in yahoo.com bing.com twitter.com facebook.com google.com youtube.com; do
        echo "$site: \t" `dig @$dns $site | grep 'Query time:' | awk -F : '{print $2}'` >> result.txt
    done
    echo "\r\n" >> result.txt
done

Usage: ./GDNSBenchmark.sh <your current dns>  (e.g. ./GDNSBenchmark.sh 192.168.178.1)