Table of contents
Nowadays, a lot of beginners straightaway start learning the internet language HTML, CSSS and Javascript without understanding the fundamentals of how the internet works. But, before deep diving into it, let's understand what exactly is the internet.
What is the Internet
A lot of people think of the internet as a cloud, something that's hanging around in the sky, it's super-complex and super difficult to understand, but actually, that's not it all. The internet is really simple. All it is just a long piece of wire and the wire connects different computers to each other. So you might have one computer that's in New Delhi and another computer that's in California. They can talk to each other and transfer data through this giant wire. Now some of these computers attached to the internet have a very special job. They have to be online 24/7 ready to serve you all of the data and the files that you are requesting when you try to access websites and the computers that are doing that job, we would call a server. And the computer that any user would use to access the internet is called a client. Now you can imagine a web server as a giant library, that's open 24/7, and you can go in there at any hour of the day and request, "I want to see Google's homepage". And it would be able to serve you with all of the files and data that you would need to be able to view whatever website it is that you requested. Now you can imagine if there's a library to house all of these websites, then it's going to be pretty difficult to quickly locate the thing that you want out of this giant library. So, how is this problem solved on the internet?
How Internet Works
Let's say that you're sitting at home on your computer and you type in google.com because you want to head over to the main Google homepage. What happens behind the scenes is that your browser will send a message to your Internet Service Provider (ISP). These are the people who you pay to be able to access the Internet. Now the message that you're sending the ISP is "I want to see google.com" and the ISP will then relay that message to something called a DNS server, a domain name system server. And a DNS server is essentially just a souped-up phonebook. And what happens when you make that request through your browser is the DNS server will look up in its database as to what is the exact IP address of that website that you're trying to access. And every single computer that's connected to the internet has an IP address. This is like a postal address for your computer so that when people need to send and receive files on the internet, each computer can be located by their unique IP Address. And once the DNS server finds the IP address, it sends that back to your browser. So, now you know the exact address where you can find the Google homepage. The next thing that happens is you will send a direct request to that address through your ISP. And this message will be delivered via what's called the internet backbone.
Submarine Cable Map
If you head over to submarinecable.com, you can view all of the underwater cables that power the internet. And the internet is made up of these huge sprawling masses of wires connecting all of the World's internet users. Now, if I am sitting in New Delhi and I want to see a website that's hosted in the United States, then my browser would have to make a request that goes through one of these cables under the ocean to reach the US. And once that computer has received my request, they'll send back all of the relevant data again through these giant cables. And to navigate all of these crazy underwater and above-water wires, all I have is an IP address.
So once I have gotten the IP address of the website that I want to access, then my browser sends another message through ISP via Internet Backbone to the server that is located at that address, which is of course the Google server. And on this server, there are all of the files I would need in order to be able to view the Google homepage. The server then sends all of those files back to me through the internet backbone and I get to see the Google homepage in my browser. And all of these happen in a matter of milliseconds.
#BlogsWithCC #iWriteCode