How Internet Works??

I was always curious to know how does this internet thingy works but never got the time to read about it. Now during the setting up of this site, I came to know about it and just wanted to share this piece of knowledge. So, here it goes :

As you all know every computer has an IP address associated with it. The sites you see on the net are actually stored on a computer called  server. There are millions of them spread across the globe. Each server also has an IP address associated with it.

When you type a site`s name (URL’s like www.google.com) in the address bar, the web browser actually directs you to the server`s IP address. Just imagine how difficult it would have been if you would have to remember the IP address of every site!! Anyways, you must be asking how does browser converts URL to the IP address of the site?  The answer lies in DOMAIN NAME SERVERS (DNS).  It`s in reality a computer (Server, actually)  where URL`s are mapped to their corresponding IP addresses.

Now the strange thing is that there is a file on your computer also called HOSTS file which does this and associates the commonly visited site`s URL with  its IP address. Now, there are millions of DNS servers all around the world. And all these actually communicate with each other whenever necessary.

For example, when you  visit a website, the browser first checks the hosts file on your computer to locate the site`s IP address.  If it is not found then it asks the preferred DNS server which you must have encountered during the setting up of your internet from your ISP. When this DNS server also do not have the information, then it asks another DNS server for the information. In this way, DNS’s keep asking further until a match is found. When the proper IP address is found, it sends it back to your browser.

Obviously, it will take more time to open a website if IP address is found after many requests. Well, the good thing is all DNS servers that  were part of this chain of requests automatically store the new information of that site so that next time you visit the same site, it automatically fetches you the corresponding IP address and thus reduces considerable time in opening the website.

  1. Rakshak says:

    This is a wonderful guide ..its simple and yet so illustrative..wait-a-go man!!!…i would love to hear more guides like these..keep up the good work!!

  2. Gaurav Gupta says:

    Nice writeup… your bro can probably write “an anatomy of the www” and gift it to you :)

    Gaurav (Slideshare)

  3. sunny007 says:

    nice work yaar …….

  4. anirvana says:

    cool

  1. [...] site on a VPS, my brother has been able to put together his blog at sohilgupta.com. Nifty, eh? Here are some learnings he picked up on his way to get this done. Congrats doode and keep writing! Share and [...]

Leave a Reply