How does the internet actually work ?

·

5 min read

what exactly is the internet ?

The internet is really simple. All it is 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 AFRICA and another computer that's in US

image.png

and they can talk to each other and transfer data through this giant wire.

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 computers that any user would you use to access the internet is called a client.

image.png

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, or I want to see the latest post on Facebook. 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 that's big enough to house all of these websites,

image.png

then it's going to be pretty difficult to quickly locate the thing that you want out of this giant library, right?

So how is this problem solved on the internet?

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 So these are the people who you pay to be able to access the internet. And if you're in the US that's a company like AT&T or Comcast, and if you're in the UK, then that would be something like BT or Talk Talk. 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 phonebook.

image.png

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 are trying to access. And every single computer that's connected to the internet has an IP address. This is like a postal 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. image.png

And once the DNS server finds the IP address, it sends that back to your browser. image.png

#The next thing that happens is you will send a direct request to that address

through your internet service provider. And this message will be delivered via what's called the internet backbone.

the internet backbone

isn't some sort of analogy for some clever Programming. It's literally the backbone of the internet. And if you head over the submarinecablemap.com,

image.png

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. As you can imagine it's a pretty complex world out there

image.png

Now , if I'm sitting in London 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 Atlantic ocean in order to reach the United States. 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 this crazy underwater and above water wires, all I have is an IP address.

image.png

It's like as if I'm sending a letter halfway across the world and my only hope for my letter to reach my friend is that postal address on the front of the envelope.

image.png

So once I've gotten the IP address of the website that I want to access, then my browser sends another message through the internet service provider via the internet backbone to the server that is located at that address 216.58.210.46. And the computer that's located at that address is of course the Google server. And on the server there's all of the files that I would need in order to be able to view the Google homepage.

image.png

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 that happens in a matter of milliseconds.

image.png

And just to imagine the journey that my data has gone on traveling through the world thousands of times per day. So why don't you give it a go? Open up your browser and type in 216.58.210.46, and hit enter to see the Google homepage being served up to you through the internet.