DNS – The Rolodex of the Internet

For many years, the Rolodex was the primary tool used to keep track of large numbers of addresses for people you knew or did business with. Today, most of that information is handled digitally.

If you have ever wondered how you type “google.com” into your browser, and your computer magically connects to their server and retrieves a web page, the answer is DNS.  You can think of DNS like a giant Rolodex of the internet where you can look up a name like “google.com” and find an address.

The abbreviation DNS can stand for the system as a whole (Domain Name System), a server that is part of that system (Domain Name Server), or just the individual service on that server resposible for DNS (Domain Name Service).  In any case, it is this system of servers that are responsible for converting a name into a numerical address(aka: IP Address) that your computer can use to reach across the internet.

The language used to communicate between clients and servers in this DNS system is based on questions and answers.  Clients, such as your computer, pose a question; and the server replies with an answer.  If you ask “Where is google.com”, the server will answer with something like “google.com” is at “123.123.123.123”.  Your computer then connects to “123.123.123.123” and requests the desired web page.

This is analogous of looking someone up in your Rolodex by their name so that you can find their address to mail them a letter.  However, what happens if your Rolodex does not have the person you are looking for? Or, what if their address is out-of-date, and you are not sure if they have moved?

These are the kind of problems that the DNS system faces, and the system was designed to solve them.  If Google’s internet address never changed, your computer could just hold onto that address forever and never have to look it up again.  However, in reality, sites change addresses at least as often as people move into new homes.  And with billions of websites, keeping track of all those names and addresses is too much of a task for any single computer.

Imagine how this might work in the real world.  If you need the current address for “Jon Doe, Jr.” but do not have his number, you might contact his father “Jon Doe, Sr.” for it.  But maybe “Jon Doe, Sr.” does not have the address so he gives you Jr’s phone number so you can call him and get the address.

This is how the DNS system works.  Except, let us change the name from “Jon Doe”, to “Jon Com”.  Then, let us remove the casing and use dots instead of spaces, giving us “jon.com”.  For “jon.com, Sr”, we will drop the Sr suffix and assume that if we leave out Jr, we are referring to the father.  For “jon.com, Jr”, we will move the suffix to the beginning, giving us “jr.jon.com”.  And so we end up with the following two fellas:

“jon.com” – the father
“jr.jon.com” – the son

We want to know the address for “jr.jon.com”, but this time we do not have the contact information for either of them.  So we call the “com” family headquarters and ask for the address of “jr.jon.com”.  They tell us they do not know his address, but they have his father’s contact information.  So we contact his father, “jon.com”, and he tells us his son “jr.jon.com” is living over at “123.123.123.123” boulevard.

You can see that we might run into a problem if we did not have the contact information for the “com” family headquarters.  The DNS system handles this problem by having a group of DNS servers (aka: name servers) known as the “root” name servers.  The address of these servers never, ever, ever, ever changes… ever.  And you can start any address search with those servers, knowing they are always where they should be; and you can work your way down the line until you find the address you want.

So, we ask the “root” name servers where “jr.jon.com” lives, and they respond that they do not know but give us the contact details for the “com” name servers and refer us to them.  We then proceed as before until we get the address we want.

An example that is a little closer to home, might be trying to find the address of “google.com”.  We start our search at the “root” name servers, and they again give us the address for the “com” name servers. We contact the “com” name servers, and again they do not know the address we want, but they do have the address of “ns1.google.com”, whom they insist has the address we want.  We then contact “ns1.google.com”, and he gives us the address for “google.com”.

This is how the DNS system operates.  However, there is a piece of the puzzle still missing.  Your computer at home likely never goes through this whole operation.  Instead, your internet provider has a DNS server that acts like a “middle-man” in this whole operation.  That DNS server is like a private investigator that does all the leg work to track down whatever addresses you want, and all you have to do is sit and wait for him to get back with the answer.  This is good because if he answers these questions for thousands of people, sometimes he can skip all of these steps since he already found a specific address earlier that day.

On the other hand, this can also pose a potential problem when you move your website to a new address.  These “middle-man” servers might have your old address due to looking it up earlier that day, meaning anyone using them would get your old address.  The process of these “middle-men” eventually performing new look-ups until they all have your new address is generally referred to as the “propagation” of the new address and take several hours or days.  There is no way to force these guys to stop using your old address, and you simply have to wait until they think it has been long enough to go through the look-up process again.

Luckily, the DNS system has some built-in mechanisms for helping with this.  Every DNS record has a time-limit on it known as the TTL (time-to-live).  And most DNS servers will respect that time limit and stop using your old address once that time limit is passed.  If you know ahead of time that you will be making a change, you can lower the TTL on your DNS records to something small, like 5 minutes.  However, if you go too low, some servers may disregard the limit altogether and simply use their default so it is not recommended to set it lower than 5 minutes.

With all of these mechanisms in-place within the DNS system, you can see the work that has been done to solve the problems that face this type of system.  And although it may not be perfect, it does a pretty good job. So good, in-fact, that most people do not even know it exists.

That about wraps up this walk-through on how the DNS system performs its critical task of being our internet Rolodex.  Hopefully this article has helped you understand the DNS system a little better than before.

Hostek.com is a leading Hosting provider of customized Windows Cloud Hosting and flexible cPanel VPS Hosting.  We would love the opportunity to work with you to find the right solution to eliminate all your hosting concerns.

Tags:

Categories: ,