Domain Name System (DNS)

Domain Name Systems (DNS)

The distributed system:

Name servers do two things all day ago. They accept request from programs to convert domain names into IP addresses
They accept request from other name servers to convert domain name into IP addresses.
When a request comes in, the name servers can do one of the four things with it

  1. It can answer the request with an IP address because it clearly knows the IP address for the domain
  2. It can contact anther name server and try to find the IP address for the name requested
  3. It may have to do this multiple time
  4. It can say , "I dont know the IP address" for the domain you requestesd, but here is the IP address for a name server that knows more than I do
  5. It can return an error message because the requested domanin name is invalid or does not exist

Browser therefore contacts its main server and says,"I need you to convert a domain name to an IP addresss."
For example, if you type "www.java.com" into your browser,the browser needs to convert the URL into an IP address.
Browser will help "www.java.com" to its default name server and asks to convert it
The name server may already know the IP address for the server

That would be the case if another request to resolve "www.java.com" came in recently (name servers cache IP address to speed things up ). In that case, the name server can return the IP adrdess immediately. Let's assume however that the name server has to start from scratch

A name server would start its serach from an ip address by contacting one of the root name servers.
The root servers know the IP address for all of the name servers that handle the top level domains. Your name servers would ask the root for the "www.java.com" and the root will say "assuming no caching")

I dont know the IP address for www.java.com, but here is the IP address for com name server
Obviously,thesee root servers are vital to this whole process,so;

There are many of them scattered all over the planet.
Every name server has a list of all the known root servers.
It contacts the first root server on the list and if that does not work it contacts the next one in the list,and son.

Comments

Popular posts from this blog

Parallel Database design, query processing

Laravel | PHP | Basics | Part 2

Apache Hadoop | Running MapReduce Jobs