My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

How exactly does the internet works?

Stellamaris Chinwendu's photo
Stellamaris Chinwendu
·Oct 24, 2021·

5 min read

how_internet_works.jpg

We use internet every single day without knowing how it works completely. So, what exactly is the internet? Well, a lot of people think of it as a cloud, something that's hanging around in the sky, it's super complex, super difficult to understand, but that’s not it at all.

The internet is simply a long piece of wire, and the wire connects different computers to each other, you might have one computer that's in Nigeria and another computer that's in the UK, and 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 must be online 24/7 ready to serve you all 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 it a server and the computers that any user would use to access the internet is called a client.

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 for an information. For example, you could open a facebook.com and it can be able to help you access all the posts and comments from people all over the world, You can imagine if there's a library that's big enough 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, right? So how is this problem solved on the internet? Well, let's say that you're sitting at home on your computer, and you type in facebook.com because you want to head over to the main Facebook homepage.

What happens behind the scenes is that your browser will send a message to your internet service provider. These are the people who you pay to be able to access the internet. If you're in Nigeria that's a company like MTN, Airtel, or Glo. The message that you're sending the ISP is I want to see facebook.com and the ISP will then relay that message to something called a DNS server, a domain name system server. A DNS server is essentially just a souped-up phonebook.

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. Facebook.com IP Address is 102.132.101.35, you can actually go streagth to facebook homepage its 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 Facebook homepage. 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.

Internet backbone is literally the backbone of the internet. And if you head over the submarinecablemap.com, you can view all the underwater cables that power the internet. 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 complex world out there. Now, if I'm sitting in Nigeria 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 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 these crazy underwater and above water wires, all I have is an IP address.

It's 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, 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, the computer that's located at that address is of course the Google server.

On the server, there are all the files that I would need to be able to view the Google homepage. The server then sends all 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. Just to imagine the journey that my data has gone on traveling through the world thousands of times per day.

In summary, A client would send a request (data), then the request will break into packets. These packets move through an Internet Service Provider like MTN, Airtel, etc. With the help of a Router, ISP routes the request to a server further up the chain on the internet.

Eventually, the request will hit a domain name server (DNS). This server will look for a match for the domain name you've typed in (such as facebook.com). If it finds a match, it will direct your request to the proper server's IP address. Then the server will receive the request and send feedback that will come as a response in form of packets.