Part 1 — The scenario
The story
It's 9:14 pm. You're on the sofa with your laptop, connected to home Wi-Fi.
Your cart on shop.example.com holds a pair of running shoes. You click
Place order.
The browser's JavaScript runs:
await fetch("https://shop.example.com/api/v1/orders", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "7f3c9a2e-1b4d-4c8e-9f00-2a6b8d1e5c43",
},
body: JSON.stringify({ cartId: "c_8812", paymentMethodId: "pm_77" }),
});
From your point of view that's one line of code. Underneath, it involves about a dozen devices, three or four organisations, two continents' worth of routing tables, and every layer of the OSI model, twice: once on the way out and once on the way back.
The cast of characters
All addresses use reserved documentation ranges, so they're safe to copy.
| # | Who | What it is | Key addresses |
|---|---|---|---|
| 1 | Your laptop | The client: browser, OS kernel, Wi-Fi chip | MAC 3c:22:fb:aa:bb:01, IP 192.168.1.23 |
| 2 | Home router | Wi-Fi access point + switch + router + NAT + DHCP server + DNS forwarder in one box | LAN MAC 9c:53:22:00:00:01, LAN IP 192.168.1.1, WAN IP 203.0.113.7 |
| 3 | ONT (Optical Network Terminal) | The small box that turns the fibre's light into Ethernet | (no IP you care about) |
| 4 | ISP access network | OLT, aggregation switches, BNG (Broadband Network Gateway) | Your gateway as seen from the ISP |
| 5 | ISP core and the Internet | Routers that speak BGP to other networks | Many hops |
| 6 | Cloud edge | The cloud provider's border routers | |
| 7 | Load balancer (ALB) | An L7 proxy that terminates TLS and routes by path | Public 198.51.100.20, private 10.0.1.15 |
| 8 | Kubernetes node | A VM running your pods | 10.0.2.40 |
| 9 | orders-service pod |
Your code | 10.0.2.77:8080 |
| 10 | Postgres | The database | 10.0.3.10:5432 |
| 11 | DNS resolvers | Recursive resolver, root, .com TLD, example.com authoritative servers |
Various |
The map
YOUR HOME ISP INTERNET CLOUD REGION (VPC 10.0.0.0/16)
┌─────────────────────────┐ ┌────────────────────┐ ┌────────────────────┐ ┌──────────────────────────────────────────┐
│ Laptop │ │ │ │ │ │ ┌─────────┐ ┌──────────┐ ┌────────┐ │
│ 192.168.1.23 │ │ OLT ─ Aggregation │ │ Transit / peering │ │ │ ALB │──▶│ K8s node │──▶│ Pod │ │
│ │ Wi-Fi (radio) │ │ │ │ │ routers (BGP) │ │ │ L7 proxy│ │10.0.2.40 │ │10.0.2.77│ │
│ ▼ │ │ BNG ─ Core ──┼──▶│ │──▶│ │10.0.1.15│ └──────────┘ └───┬────┘ │
│ Home router 192.168.1.1 │ │ │ │ │ │ └─────────┘ │ │
│ NAT → 203.0.113.7 │ └────────────────────┘ └────────────────────┘ │ ▲ 198.51.100.20 ┌───────▼────┐ │
│ │ Ethernet (copper)│ ▲ fibre (light) │ │ │ Postgres │ │
│ ▼ │ │ │ │ │ 10.0.3.10 │ │
│ ONT ════════════════════┼──────────┘ │ └────────────┘ │
└─────────────────────────┘ └──────────────────────────────────────────┘
Keep this map in mind. Every layer chapter comes back to it.