How the OSI and TCP/IP models work
medium 40 minA network request is a message wrapped in headers, one per layer, like dolls inside dolls.
How to approach it
What this question tests, where it gets hard, and how to spend the time.
How to answer
The URL question, layer by layer
- 1
Say the plan first
"I'll go from the name to the first byte: DNS, routing and ARP, TCP, TLS, HTTP, then what the server side does. Stop me where you want depth."
- 2
Name each layer as you pass it
DNS is an L7 message over UDP 53. ARP is L2. The handshake is L4. TLS does OSI's L6 job. HTTP is L7.
- 3
Give one number per step
MTU 1500, MSS 1460, TTL 64, port 443, about three round trips after DNS.
- 4
Say what can fail at each step
NXDOMAIN, ARP FAILED, connection refused or timed out, certificate errors, 502 or 504.
- 5
Go deep where they push
Kernel path for SRE roles, CDN and caching for full-stack roles, load balancers for production roles.