What is DNS? How does it work?
![]() |
What is DNS? How does it work? |
What is it ?
DNS means "Domain Name System". Basically it's the system that translates an domain name (www.google.com) into an IP address (173.194.40.174) which is the unique identifier of some piece of hardware on a network.You can understand the use for such a system : it's much easier to remember the name than the address. Moreover, a name can translate to several address depending on the time, the load of the server etc.
How Does It Work ?
The first step is to register you domain name. To put it simply, you buy it so that you are the one who will be able to make the association name <-> address. Once you are the proud owner of the domain name, you have access to what is called the "DNS zone", which is basically a list of pairs name <-> IP. It's a list because when you own a domain name, you can also use sub-domains (mail.google.com, plus.google.com, ...), each of them can be associated to a different address. Once you have configured the DNS zone, it is stored on your registar's server.
What is left to explain is how the queries are made. How does your computer knows the IP address for a given name ? When you type www.google.com in your browser, the browser starts by asking the translation to a root nameserver. There are 13 of them, and they are the entry points of the DNS protocol.
When they receive a request, they usually don't know the answer (as there are too many domain names) but they know who to ask. For example, they know that www.google.com depends on the "com" DNS server (which handles the domain names with the .com TLD). So the request in then sent to this server, which will in its turn know who to ask, and this continues until the request is sent to your registar's server, which will know the answer your computer is looking for.
Now in reality, this is not the real process. As you can imagine, the number of requests is overwhelmingly huge, and the 13 servers would create a bottleneck a lot too small for every request. There are complex caching systems used to relieve the pressure on these servers and they are, in fact, involved in only a small part of the traffic.
Caching DNS servers will store the answer to DNS queries for a given time, and answer directly if the same query arrives again in this time frame. In practice, your computer will ask these caching servers, and the caching server will ask the authoritative servers for the answer (if it's not in the cache).
https://drive.google.com/open?id=0Bz3wd5KpuQCVMzl4eUtYa2ZWalk
If you find this article is useful don't forget to share on google plus & Facebook for more social awareness.