A Beginner's Guide to How the Internet Works

Have you ever wondered what happens under the hood when you type a website address and it “magically“ appears on your device within seconds?

Every day, we effortlessly access information on the Internet, stream videos, and connect with people across the globe. However, behind this simplicity lies a complex system of technologies working seamlessly together.

The Internet relies on protocols and systems like HTTP and DNS to make everything happen, from translating web addresses into IP addresses to transferring data across networks.

If you have ever wondered how it all works, you should read this article. You'll learn about the key components of online communication, how data travels between your device and servers, and the steps involved in processing and displaying information. By the end, you’ll have a clearer understanding of the technology that powers our connected world.

What is the Internet?

The Internet is a network of computers connected together across the globe to share information, resources and services. It is essentially the backbone of modern digital communication, enabling technologies like websites, emails, streaming, and more.

Some of the key features of the Internet include the following:

  1. Global Connectivity and Data Sharing: The Internet makes it possible for billions of devices like smartphones, laptops, and servers across the world to connect and share information with each other. As a user of the Internet, you can share data such as music, videos, text, etc with anyone else on the Internet.

  2. Infrastructure: The Internet relies on a combination of hardware (such as servers, routers, cables, etc) and software (protocols and applications) to function. It uses the TCP/IP protocol suite which is a set of rules that determine how data should be formatted, transmitted and received over the Internet.

  3. Decentralization: The Internet is decentralized, with many independent networks working together. No single entity owns or controls it.

Key Components of Internet Communication

We have established that the primary assignment of the Internet is to connect devices to share data worldwide. In essence, these devices communicate with each other. But how exactly does this happen? First, lhave a look at the key components that make communication over the Internet possible:

  1. Servers: These are power computers that host or store websites, applications, and any form of data you can think of. Think of servers as the source of all the information you can access online. Everything you see online is somewhere on a server computer.

  2. Clients: In Internet terms, a client refers to any device or application that allows you to access data available on a server. A client sends a request to a server and sends you the server’s response. Examples of clients are smartphones, laptops, browsers, etc. A smartphone is a client because it can connect to the Internet. A browser is a client because it is an application capable of sending requests to the server.

  3. Routers and Networks: Routers and networks ensure data can travel between servers and clients. Routers guide data to travel along the fastest available route while networks (wired or wireless) ensure the client and server remain connected to each other.

How Does Data Travel Across the Internet

Now that you know the components that facilitate communication over the Internet, you need to know how data travels on the Internet while utilizing these components.

From a high-level perspective, data travels over the Internet in three main steps:

  1. The client send a request to a server. Clicking a link or typing a website url in your browser will kickstart this process.

  2. The server process the request and send a response.

  3. The client receives the server’s response and displays it to the user.

This image depicts the steps listed above:

The Client Makes a Request

When you (a user) clicks on a link or type a website URL or perform a google search, your device (mostly through a browser) , the client, sends a request to a server. This request is broken down into small chunks called packets. Packets make it easier for the request to travel faster. Under the hood, this is what actually happens:

  1. The Role of the Browser: A web browser (or other client application) formats the user's request using the HTTP/HTTPS protocol and sends it over the network. HTTP means HyperText Transfer Protocol. HTTPS is the secure version of HTTP.

  2. DNS Lookup: DNS means Domain Name System. It is often called the phonebook of the Internet. The DNS converts website URLS such as www.google.com to IP addresses like 142.250.190.78. Since the server will not understand the human readable format (like google.com), the IP address makes it possible for computers to locate the resource.
    When the domain name gets resolved to an IP address, this address is included as part of the request. The IP address in this stage will be the destination address for the client i.e. the location of the server expecting the client’s request.

  3. Routing the Request: At this stage, the client’s request is broken down into packets and routed through multiple networks to reach the destination server. Since the destination server has been resolved to an IP address by the DNS, the IP protocol guides the packets as they move towards it. The routers along the way ensure the packets take the most efficient path.

The Server Processes the Request and Sends a Response

After the server receives the client’s request, the following things happen:

  1. The server processes the instructions in the request. A request might instruct the server to provide a webpage, access a database, or even stream a video file.

  2. After the server processes the instructions, it prepares a response for the client. This response is broken down into packets and the IP address of the client is attached to them.
    NOTE: The response of the server can either be a good response or not. For instance, if the client requests for a restricted resource, the server might respond with a message that says “Unauthorized“.

  3. Once the packets are ready, the server sends them back to the client by following the same process of routing through networks.

The Client Reassembles the Data and Displays It

After the client receive the response (in form of packets) from the server, it reassembles them back to their original form.

When a packet is created, a sequence number is attached to it. This allows either the client or server to know how to arrange multiple packets.

When the packets have been properly rearranged, the client displays the result to the user. For example:

  • A webpage appears on the screen

  • A YouTube video starts playing

  • An error message is displayed if the server could not complete the client’s initial request.

Conclusion

The Internet is a very interesting technology with lots of layers to explore. In this article, you have learned how the Internet transfers data from one place to another. However, there is so much more than that! In another article, you will learn more interesting concepts about the Internet.

If you enjoyed reading this article, feel free to say hi on X!