Frontend Mastery — How the internet works

Ewere Ebie
Geek Culture
Published in
5 min readDec 18, 2021

--

For a tool currently so fundamental to our daily lives, It's shocking how many people(software engineers even) cannot in plain terms explain what the internet is and how it works. I couldn't for the longest time because I was so engrossed in the creation of websites that I forgot to consider the work it took to deliver these products to the end-user.

What does an understanding of the workings of the internet bequeath you? Asides from bragging rights and an appreciation for the wonder that it is, knowing how the internet works will enable you (as a developer) to optimise your code in order to speed up the delivery of web pages. Sounds intriguing enough? if so, let's crack on 😁.

What is the internet?

The internet is a worldwide network that transmits data and media across interconnected devices.

It began as an experiment named ARPANET in the 1960s and was geared toward building a communication system that could survive a nuclear attack(Ka-boom!!!).

How does data get displayed on your device? I used to think it was mainly through satellites but if that was the case the latency would be unbearable for this impatient generation (yea Zoomers I’m talking to you 😂). To know how majority of devices display pages we must first understand how they get internet connections.

How we get connected to the internet

The internet gets to us through a network of optical fiber cables(information transferred with light rays) laid underneath the sea between several data-centers (buildings containing powerful computers called servers dedicated to sending out data when requested) and your device(client) location.

The earth’s submarine fiber optic cable network

When you connect to a router via wifi or ethernet cables, we get linked up to this network of optical fibre cables through our ISP — internet service providers(those guys that swap your money for browsing credit).

Step 1 — Requesting a web page

When you enter a URL(Uniform Resource Locator) into your browser, the browser seeks to obtain the IP Address for the specified domain name.

An IP address is a number assigned to every device connected to a network that uses the Internet protocol. They come in the form nnn.nnn.nnn.nnn where nnn must be a number from 0–255.

Every device(server, computer, or router) that is connected to the internet is identified uniquely by a string of numbers known as an IP Address. It acts like a shipping address through which all information reaches its destination on the internet.

The Internet Corporation for Assigned Names and Numbers(ICANN) is an institution that manages IP address assignment and domain name registration.

Step 2 — Resolving domain names to IP Addresses.

You can access a website by knowing the IP address of the server it is situated in, but because they are difficult to remember, domain names like google.com are used which correspond to IP Addresses(currently 216.58.223.238).

The internet uses a huge phone book-like service called DNS(domain name system) to keep track of computer names and their corresponding IP addresses on the Internet with the aid of distributed databases(DNS databases).

Many computers called DNS servers connected to the Internet host a subset of the DNS database. Through an ISP your browser first connects to your primary DNS server specified as part of the internet connection setup on your device. In the case where a DNS server fails to find the IP address for a domain, it re-directs the requesting computer to another DNS server till the domain is resolved.

Step 3 — Sending request and receiving response using HTTP

Once an IP address is obtained the browser forwards a Hypertext transfer protocol(HTTP) request to the target server through your ISP.

HTTP is the language used for internet communication. HTTPS is a secure version of HTTP where communication between browser and website are encrypted.

When the server gets a request to access a particular website. The data is sent back in a huge collection of ones and zeros from the server in form of light pulses via the optical fibre cables. During the journey, the response gradually peels through the onion layer of all the IP addresses the request came through in order to find its way back to the exact machine that initiated the process.

Step 4 — Reassembling Data Packets

What makes the medium so efficient is that the data is broken into tiny sequenced pieces called packets before it is transferred. Packets might not be routed through the same paths as they would take the best route available at the time of their transfer. Upon reaching your device the packets are reassembled sequentially in accordance with the Internet protocol(IP) and Transport control protocol(TCP).

The IP directs packets to a specific computer using an IP address while TCP directs packets to a specific application on a computer using a port number.

After the packets are pieced together a web page or resource is birthed and ready for consumption by the user. Browsers have become so fast at doing this you most times don’t even realize it happening. amazing right? 🤯

Conclusion

Phew!! that was a lot. A number of details were skipped in order to provide a high-level abstraction of the internet and make it bite-sized enough to digest. Now you understand how data moves through the internet, you are ready to grasp the intricate details involved in rendering a web page on a browser and more.

I’m glad you took the time to read my blog. If you liked it give me a clap and follow my medium account for more content like this. Thanks 👋.

References

How Does the Internet work?

What is the internet?

How does the web work — Learn web development | MDN

How does the Internet work in 5 minutes

How does the Internet work? | ICT

How does the internet work | HP Tech takes

--

--

Ewere Ebie
Geek Culture

I write because it’s less exhausting than speaking. And its fun