We humans think about the internet in terms of links, URLs, domain and hostnames. The underlying plumbing, however, handles and routes traffic around the web using a numerical system – IP addresses.
The Yellow Pages of this relationship (translating domain names to IP addresses) is the Domain Name System, or DNS for short. When you type icanhascheezburger.com
into your web browser for a dose of LOLs, be aware that the computer must first query a DNS server for that domain’s IP. The server replies: ‘that record resolves to 50.23.69.146
’.
DNS has some additional smarts though. It knows you’re probably going to be asking the same question again and again as you fail to curb your funny cat pictures addiction. Preempting a repetitive question and answer session, the computer saves copies of the responses it receives (known as record caching). Unable to stop yourself, on clicking the ‘Next Page’ link, the computer will refer to its internal database of previously looked-up addresses, find the answer and be on its way.
This is known as the local DNS cache and it saves you valuable milliseconds and relieves servers from being nagged unnecessarily. DNS is also a hierarchical system; there are many tiers of servers, making enquiries of one another and caching the results.1 All this makes for a reliable, scalable system that hums away quietly, a fundamental aspect of the internet that the vast majority of people are completely unaware of.
Of course, there are problems that can arise concerning DNS. Tomorrow we’ll cover time to live (sounds dramatic but don’t worry) and a common troubleshooting step – flushing the DNS cache.
If you wondered ‘what sits atop this hierarchy?’ – the answer is the hallowed Root Servers. We will not be discussing this here but gold star for you! ↩︎