00. Networking and Internet Fundamentals — The Five-Year-Old Version¶
Before you design systems, you need to understand the postal service they run on.
Imagine the internet is a giant postal system. You want to send a letter to your friend across the world.
First, you need an address. Not "my friend's house" — a precise, numbered address that every post office on the planet can locate. On the internet, that is an IP address. But nobody memorizes numbers. So you write a name — like "google.com" — and the phone book looks up the number for you.
You write your message and put it in an envelope. The envelope has two things on the outside: the destination address and your return address. Inside is your data. On the internet, the envelope is a packet — headers on the outside, payload on the inside.
You drop the envelope at the local post office. The post office doesn't deliver it directly. It reads the address and sends it to the next post office, which sends it to the next, and so on. Each hop gets your letter closer. On the internet, each post office is a router.
But wait — your letter might be sensitive. Bank details. Medical records. You don't want anyone reading it along the way. So you put it in a sealed envelope — one that only the recipient can open. On the internet, that is TLS encryption. The sealed envelope means every post office can route the letter but none can read the contents.
Finally, you want a reply. So you include your return address. The recipient writes back using the same postal system. Request and response. That is how the internet works at the most basic level.
Every system design interview involves this postal system. Your API calls, database queries, CDN fetches, WebSocket connections — all are letters flowing through this network. Understanding the postal system means you can explain why things are slow, why things fail, and how to fix them.
One more thing. The postal system has rules. Some letters go by registered mail — guaranteed delivery, tracking at every step, signature on receipt. That is TCP. Other letters go by postcard — fast, cheap, but no guarantee it arrives. That is UDP. Some letters need priority delivery — express mail that skips the queue. That is quality of service.
The rules determine the tradeoffs. Speed vs reliability. Cost vs guarantees. Privacy vs inspectability. Every protocol you will learn is just a different set of postal rules.
The placeholders you will see called back¶
| Placeholder | Meaning |
|---|---|
| envelope | the network packet — headers for routing, payload for data |
| address | IP address or hostname — the destination identifier |
| phone book | DNS — translates human-readable names to numeric addresses |
| post office | routers, switches, load balancers — intermediaries that forward traffic |
| sealed envelope | TLS encryption — the packet is routable but unreadable in transit |
Top resources¶
- High Performance Browser Networking by Ilya Grigorik — free online; the definitive guide to TCP, TLS, HTTP/2, and WebSocket performance
- Beej's Guide to Network Programming — the classic hands-on introduction to socket programming
- Cloudflare Learning Center — clear, visual explanations of DNS, TLS, CDN, DDoS, and HTTP
- Julia Evans — Networking Zines — delightful visual guides to DNS, HTTP, TCP, and networking debugging
- RFC 7540 — HTTP/2 — the actual spec; surprisingly readable for understanding multiplexing and server push
- WireShark documentation — essential for packet-level debugging in real systems
What's coming¶
- 01-internet-request-lifecycle.md — what happens from URL to rendered page in 14 steps
- 02-dns-deep-dive.md — how the phone book works: resolution, caching, TTL, failures
- 03-tcp-and-udp.md — reliable delivery vs fast delivery and when each matters
- 04-tls-and-https.md — sealing the envelope: certificates, handshakes, and trust
- 05-http-versions.md — HTTP/1.1 vs HTTP/2 vs HTTP/3 and why each version exists
- 06-rest-grpc-graphql-protocols.md — application-layer protocols and their network tradeoffs
- 07-load-balancing-at-network-level.md — L4/L7, DNS-based, anycast, and health-aware routing
- 08-cdn-and-edge.md — caching at the edge: how content reaches users in 5 ms
- 09-websockets-sse-long-polling.md — persistent connections for real-time communication
- 10-vpc-and-private-networking.md — subnets, security groups, NAT, and private postal routes
- 11-network-debugging.md — tcpdump, traceroute, curl, and DNS diagnostics
- 12-rate-limiting-at-network-layer.md — DDoS mitigation, connection limits, and traffic shaping
- 13-honest-admission.md — what we don't fully understand about networks
Bridge. The postal system exists. Let's trace one letter from the moment you drop it in the mailbox to the moment it arrives. Every single step. → 01-internet-request-lifecycle.md