You wake up, make coffee, sit down by the computer and start reading your favorite web sites. You fire up your favorite browser and type www.site.com on the address bar, hit enter and continue sipping on that coffee. You wait for the page to load, sipping some more coffee – a few seconds later you get the Google search results for “www.site.com”. You scratch your head, sip some more coffee, and start wondering if you did a typo, but no it is correct – Google is not correcting your spelling. Obviously you are online, you got the Google search page. By now the coffee is gone, you are frustrated and wonder what in the world just happened to you favorite site?
We all have had the above experience, or have dealt with parents and family that had the above problem, and struggle to understand what happened to their favorite site!
As most of you know, computers do not understand “www.site.com”, they rely on DNS resolution to resolve the name into an IP address which the computer can connect to. DNS is like a giant phone book that associates memorable names to humanly incoherent IP numbers.
This blog has plenty of articles on Web Performance and Web Performance Optimization. But one item that we should have covered a long time ago is the impact of DNS to Web Performance. DNS is the Achille’s heel of the web, is often forgotten and its impact on site performance ignored until it breaks down.
We will not cover how DNS works, Wikipedia has a very good overview on how DNS works and there is plenty of content covering every side of the DNS.
Let’s look at how DNS is impacting web performance.
To illustrate our point let’s look at Techcrunch.com, its homepage has 323+ objects and relies on 72+ hostnames. A browser has to lookup 72 domains, most of which do not belong to TechCrunch. Here are two charts displaying each of the domains on the page, how many times they were called and how long it took to resolve them (Measurements taken from our Chicago Global Crossing Node).
As you can clearly see it takes time to resolve every domain. Ideally the resolution time would be very small, as the domain information would be on the DNS Cache of the computer, or at least that of the ISP. But more often than not, they are not in cache because they have very short cache TTL. Because they are not in the cache the DNS servers of the ISPs will have to resolve them by querying the system. In some cases the queries will be blazing fast and other cases they will be very slow, or even fail, because the NS servers are not distributed or not properly setup, and this will impact performance.
A web page is an ecosystem where multiple objects contribute to the web page content, and as a result to its slowness or even unavailability. Some of the slowness can be due to poor server performance but at times is due to DNS related issues.
So here are some tips to ensure that DNS is not a bottleneck in your website performance
DNS is critical component of the web, make sure you monitor and optimize it to ensure user satisfaction.
Some good tools to check your DNS:
Catchpoint – Mehdi