In the world of DNS it's not what you know, but who you know, that counts most.
DNS is like the card catalogue at your local library. Computers understand numbers, and all of the computers connected to the Internet are assigned numbers so that they can talk to each other in an orderly fashion. People don't do numbers very well. We prefer names. What if I told you to remember the address 220.127.116.11, for one of the best index sites on the Internet? Would yahoo.com work better?
To cross the barrier between human brains and computer wiring, there are thousands of Domain Name System servers to help translate. There were 27,617,033 domains registered on the Internet when I wrote this article. Click here to see how many there are now. No one computer could keep track of all of this information, so DNS is distributed across thousands of computers across the network. ZiaNet has it's own DNS servers, two of them in case one breaks down.
Our domain name servers are named ORION and NOMAD. ORION is at 18.104.22.168, NOMAD is 22.214.171.124. You may remember these numbers from when you set your computer up to connect to us. These machines do a pretty simple job, translating names to numbers. The have hard drive space to store our DNS records, and lots of RAM to store records outside of our domain. They could not store all of the records for 27 thousand computers & even if they could, how would all of the DNS servers keep up to date on all of the new addresses and all of the changed addresses? They don't. That's why we are talking about the Domain Name System, instead of a domain name server.
DNS is a network wide system of thousands of machines, each being responsible only for the domains under it's control.
ZiaNet has over 150 domains running on its servers. Our DNS records account for those domains alone. An example would be shootthesky.org. There is a record in our DNS server that we have assigned an IP address of 126.96.36.199 to shootthesky.org. If someone connected to an ISP in Arizona is looking for http://www.shootthesky.org/ the DNS server there will not know where the domain is.
It will ask one of the Root Servers, "who is authoritative for this domain?". The answer is "zianet.com, and you can ask their domain server at 188.8.131.52 or 184.108.40.206." The Arizona ISP's DNS server then asks our DNS server what IP address is assigned for shootthesky.org, and our server answers 220.127.116.11. At this point the DNS server knows what IP address to return the customer who is looking for this domain. And the customer's browser knows what IP address to send the page request to. Http://www.shootthesky.org appears in the browser window.
Root Servers are the top level of the system. These are run by AT&T, GTE, AOL, MCI, Sprint... the very large Internet backbone providers. These systems keep track of what server to ask, rather than keeping track of each and every domain assignment.
This is a very elegant and effective way of dealing with the very large problem of keeping track of IP addresses. It is decentralized, each DNS server accounts only for domains assigned to it. It is redundant, each service provider has two or more servers running so that if one breaks down, another takes over the work. At the very top level all that needs to be available is the records indicating who is authoritative for what domains.
Sometimes things break. You remember that fellow in Arizona looking for information about amateur rocketry? He found it just fine. Let's say he was looking for Yahoo. Lots and lots of people go to Yahoo every day. It would not make sense to ask the root servers each and every time a customer wants to pull up Yahoo. So, the DNS Servers are designed to cache this information. They have a certain amount of memory set aside for cache, to store the most recently requested domain information. We're usually talking about several hundred megabytes of RAM to store these IP addresses. The domains that get used most often are stored in there all the time. The domains that get used infrequently get pushed out, to make room for the most recent requests. Did I mention that those domain IP addresses can change?
Let's suppose that shootthesky.org decides they want to move their domain to another server. They start the process of signing up with another provider, do the paperwork at their favorite Internet Registrar, and start moving the files from our server to the new server.
There are a number of different companies serving as Internet Registrars. They all share a common database that keeps track of which DNS servers are authoritative for which domains.
The registrar will change their records to indicate the new authoritative DNS server for this domain. The new service provider uses different IP numbers than those used by ZiaNet. Every provider is assigned blocks of numbers based on their needs. The IP address for shootthesky.org is about to change. What about all those DNS Servers around the country who have a cached copy of the old IP address?
These DNS records have an attribute called TTL, or Time To Live. The default time to live is 24 hours. Any DNS server will look at this TTL statement before it shares the IP address information. If the record has expired, it will go back to the root servers to request new information.
A good hostmaster will set the TTL for a domain that is about to move to 10 minutes and will do so at least 24 hours before the domain will be moving. This will make the transition smooth. No one will even notice that the domain has moved, and the address information cached on various servers around the world will be refreshed with new information.
Now and then someone fails to do this. We will get a call from someone who is unable to reach a certain service. We'll look it up at the root servers and see that it has been moved. We'll stop our servers and restart them (one at a time) so that the cache is dumped from memory and all cached addresses are refreshed.
Some smart people designed all of this. It works really well for millions of computers, and for hundreds of millions of people every day. It is all too easy to take it for granted. I think it's more fun to understand how it works.
'Hope this helps,
The views expressed here do not necessarily represent those of ZiaNet, Inc., the owners or employees, or anyone considered a socially functional individual within the norms established by 21st century public education. caveat emptor.