Have you ever thought about what happens when you type google.com and press enter? What exactly is happening in the background? Well, Think no more because I'm about to tell you:
It’s a process that happens in milliseconds, but behind the scenes, your computer is performing a complex series of handshakes and data transfers. Here is the step-by-step journey of your request.
The DNS Lookup (Finding the Address):
- Browser Cache: First, the browser checks its own memory to see if you’ve visited recently.
- OS Cache: If not found, it asks your computer's operating system.
- Resolver (ISP): If the OS doesn't know, it sends a request to your Internet Service Provider.
Once your browser has the IP address, it needs to establish a connection. This is done via the Transmission Control Protocol (TCP) using a "Three-Way Handshake":
- SYN: Your computer sends a synchronization packet to the server.
- SYN-ACK: The server acknowledges the request and sends a packet back.
- ACK: Your computer acknowledges the server's response.
Since Google uses HTTPS, a secure "Transport Layer Security (TLS)" handshake occurs. Your browser and the server exchange certificates to verify the site's identity and agree on an encryption method. This ensures that no one can "eavesdrop" on your data.
Now that the "pipe" is secure and open, your browser sends an HTTP GET request. This is basically a digital note saying, "Hey, I’d like to see the content of your homepage."
Google’s servers receive your request. A Load Balancer decides which specific server in its data center is best equipped to handle your request at that moment. The server then pulls the necessary data (HTML, CSS, JavaScript) and sends it back in an HTTP Response.
Your browser receives the code and begins the heavy lifting. It reads the HTML to build the structure. It applies CSS to make it look like "Google. It runs JavaScript for interactive elements.
------------------------------------
TCP: Transmission Control Protocol is the "delivery system." Its only job is to make sure your data gets from Point A to Point B exactly as it was sent.
- The Problem: The internet breaks your data (like a photo or a website) into tiny "packets. These packets can get lost, take different routes, or arrive in the wrong order.
- The Solution: TCP numbers every packet. If Packet #3 goes missing, your computer asks the server to send it again. If Packet #5 arrives before Packet #4, TCP waits until it has both and puts them in the right order.
- The "Handshake": Before sending anything, TCP does a quick check:You: "Hey, are you there?"Server: "Yes, I'm here! Are you ready?"You: "Yep, let's go!"
TLS: Transport Layer Security is the "security guard." It doesn't care how the mail is delivered, it only cares that no one can read it except the recipient.
- The Problem: Without TLS, anyone sitting between you and the server can read your "letter" as it passes by.
- The Solution: TLS encrypts your data. It turns your password into a jumble of random characters that can only be unlocked with a special "key" held by the server.
- The "Handshake": Once the TCP connection is open, TLS steps in to:
1 Verify Identity: Make sure the website is actually "google.com" and not a fake.
2. Trade Keys: Both sides agree on a secret code to lock and unlock the messages.
Together, they create a secure, reliable tunnel. TCP builds the "road" and manages the "trucks," while TLS "armors" the cargo inside.
DNS: Domain Name System is often called the "Phonebook of the Internet." Its primary job is to translate human-friendly names (like google.com) into computer-friendly numbers called IP addresses (like 142.250.190.46).
Headline image by nathanareboucas on Unsplash
Well written!