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.