Layer 3 · Go deeper · 8 min
Go deeper
Size it, build it, then make the calls an interviewer will push you on.
Back of the envelope
Size it up
Tap through each step of the arithmetic.
How much traffic still reaches the origin?
Can a CDN absorb a 1 Tbps flood?
With no caching headers, how long might a CDN serve a file?
Build-up · 5 steps
Follow one request through a CDN
A user in Chennai asks for a product page whose origin sits in Virginia. Watch where it’s answered.
Step 1 of 5
Find the nearest edge
DNS steering or anycast sends the user to a nearby PoP, here about 10 ms away. TLS ends at the edge, so the handshakes stay local.
4 interview moments
You’re the candidate
The interviewer pushes on the hard parts. Pick an approach and see how it holds up.
Deep dive 1 of 4
Interviewer
“Your shop sits behind a CDN. What caching do the JS bundles, the HTML pages and the cart get?”
Your move. Pick an approach:
Deep dive 2 of 4
Interviewer
“Your pages vary by language, and the CDN hit ratio is poor. The key includes Accept-Language and every query string. What do you change?”
Your move. Pick an approach:
Deep dive 3 of 4
Interviewer
“A cricket final streams live, and millions want the same segment within a few seconds. What protects the origin?”
Your move. Pick an approach:
Deep dive 4 of 4
Interviewer
“Your payment-status API can’t be cached at all. Is it still worth putting behind the CDN?”
Your move. Pick an approach: