[EN-US] How does the internet work?
Jessica Aline

Jessica Aline @jessicaalines

About: 🤓 Studying cloud computing and IA ☁️ 🇧🇷🇺🇸 Bilingual blog — posts in English and Portuguese Posts em português 🇧🇷 e inglês 🇺🇸 sobre cloud e infraestrutura

Location:
Curitiba, Paraná
Joined:
Jan 10, 2023

[EN-US] How does the internet work?

Publish Date: Jun 19
1 0

Today I decided to write a bit about an essential topic, about the foundation that even allows this post to be read by other people: the internet.

All references used in this text were obtained through MDN documentation.

Before talking about the technical composition of what we know as the internet, I think it's interesting to provide a brief context about its creation. The history of the internet began in the 1960s, through research projects by the United States Army. It was only during the 1980s that the internet gained a public infrastructure, supported by public universities and private companies.

Since then, many things have been perfected, and as technology advances at a rapid pace, it would be no different with the internet.

Another important conceptual point to remember is that the internet is the backbone of the web (the web is built on the internet's infrastructure). In other words, the internet is the infrastructure that allows billions of computers to connect.

One of the things that most intrigued me about how the internet works was how content is delivered. For this, we have various data centers spread across different parts of the world.

Inside data centers, there are racks, which are structures built to organize and protect equipment (like a closed shelf). Inside the racks are the servers (like books on a shelf), where data is stored. On the internal part of the servers, there's an SSD, which functions as long-term memory (which would be like the content of the book itself).

Image of a datacenter
Source: ISPBLOG

Image of a server
Source: Controle net

But what exactly are these blessed servers? They are powerful computers whose purpose is to provide stored content when requested. We can think of a server as a waiter who delivers an order to a customer.

So, when someone makes a "request" for content stored on these servers, the content travels through a complex network of fiber optic cables. The cables connect the data center to the requesting device. This is independent of the device's connection method to the internet (mobile data, Wi-Fi, ethernet cable).

Image of a submarine optical fiber network
Source: Submarine Cable Map

Data transfer via fiber optic cables can occur for all devices connected to the internet (tablet, smartphone, laptop, server, etc.). These devices have a unique identifier, a sequence of numbers called an IP address.

An IP address works like a home address. Mail can arrive at the correct place because it has a specific address. In other words, the IP address follows the logic of a delivery address, allowing information to reach its destination (this is defined by the ISP: Internet Service Provider).

If an IP address functions as a delivery address, the servers in data centers also have IP addresses (following the sender and receiver logic). A server can, for example, store a website, so you and I can access any website by knowing only the server's IP address.

However, memorizing IP addresses isn't very practical. That's where DNS (Domain Name System) comes in. Its function is to establish a link between an IP address and its equivalent domain name. It's easier to know a person's name than their Social Security Number, right?

The example below was validated in Windows PowerShell:

Image of PowerShell prompt

Returning to servers, a single server can store multiple websites. This means not all sites can be accessed using their server's IP address. Therefore, websites are identified by extra information, such as the host header, to aid in their recognition. Thus, we can say that servers can have a one-to-many relationship: one server, with one IP address, serving multiple websites.

For this reason, giant sites like Facebook and YouTube have an entire dedicated data center infrastructure.

With this, we know that internet access is usually done via domain names and not via IPs. The IP addresses corresponding to their domain names are obtained through DNS, which functions as a huge contact list (linking names and numbers). As mentioned earlier, this is managed by the ISP or other organizations.

With this information in hand, we can trace the step-by-step process of data when a request is made:

  1. The user accesses the browser;
  2. Types the domain name;
  3. With the IP address, the browser forwards the request to the data center (to the server in question);
  4. When the server receives a request to access a specific website, the data flow begins;
  5. Data transfer occurs in digital format, through fiber optic cables (more specifically, in form of light pulses);
  6. These light pulses eventually need to travel thousands of kilometers, through fiber optic cables, to reach their destination;
  7. The cables carrying the light (light pulses) are stretched along the seabed to their destination, where they meet a router;
  8. The router converts the light pulses into electrical pulses, which reach the device via an ethernet cable. NOTE: If the destination device is a cell phone using mobile data, the optical cable signal is sent to a cell tower, which then transmits the signal to the device through electromagnetic waves.

Image of a pc and a server conection
Source: Medium

Regarding the steps described above, one particular part made me very curious: how are these fiber optic cables installed? Since they play such an important role in this story, here's a brief summary:

The global installation of submarine fiber optic cables is carried out by companies like AT&T and Google, using specialized cable-laying ships. A submarine plow is carefully lowered to the seabed; as the ship tows it, the plow cuts a trench and simultaneously inserts the cable into it, protecting it. These cables are highly robust, with multiple layers of protection, and their installation is meticulously planned to prevent damage and ensure global connectivity.

Image of a optical fiber cable installation
Source: Honest Cable

Since the internet is a global network, it's important to have a managing organization to assign IPs, domain names, etc. This institution is ICANN (Internet Corporation For Assigned Names and Numbers) and is located in Los Angeles, United States.

Considering everything that has been said so far, the internet's efficiency lies in its method of data transmission. There's a complex infrastructure operation happening behind the scenes so that, through device screens, the internet seems magical. This text, for example, is sent from a data center in the form of zeros and ones. This efficiency is in how these zeros and ones are divided into small pieces (packets) and transmitted.

These streams of zeros and ones can be divided into different packets by the server, where each packet consists of 6 bits. Along with the text bits, each packet also consists of the sequence number and the IP addresses of the server and the requesting device.

Image of a pc screen
Source: Gemini

From this information, the packets are routed to the device, but not all packets will necessarily be routed via the same path, and each packet independently follows the best route at that moment.

It's like two delivery riders at the same restaurant waiting to deliver food to different customers who live in the same condominium. They might use different routes, according to what Maps or Waze indicated at the time, but they will still both reach their destination.

When the data arrives at the device, the packets are reassembled according to their sequence number. If any packet doesn't reach the device, a confirmation is sent for the lost packets to be redelivered.

Image of a puzzle image missing pieces
Source: eBay

This follows the same line as the Gilmore Girls episode where Kirk is working as a mailman and delivers all the mail to the wrong addresses. In the end, the residents themselves organize a scheme to ensure their letters reach them.

That's why on the internet there are protocols (to avoid digital Kirks), which are responsible for managing this complex flow of data packets. Protocols define the rules for converting data packets, attaching source and destination addresses to each packet, and the rules for routers. We can think of protocols as the postal service.

For different applications, different protocols are applied:

  • TCP/IP: data transport and addressing
  • HTTP/HTTPS: web access
  • RTP: live streams, calls over the internet (VoIP)

Image of a cartoon with a car full of mail
Source: Custom Cartoon Gifts

This text, by no means, intends to exhaust the subject or even provide a detailed overview, but rather to give a general vision of how the internet works behind the scenes. The idea is always to share knowledge, understanding that knowledge is not something fixed, but a constantly updating construction.

Comments 0 total

    Add comment