Code Room
System designHard
Question
Design the request-routing layer of a CDN that serves 50M requests/sec across 250 edge PoPs, deciding for each request which PoP and which cache server inside that PoP should handle it, and routing cache misses to the right origin/mid-tier. Goals: maximize cache hit ratio (each object should consistently land on the same cache node within a PoP), keep p95 edge latency under 20ms, shed load from a saturated PoP to a nearby one, and route around a failed origin. Walk through PoP selection, intra-PoP request routing, and the main trade-off.
What a strong answer looks like
Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.
Learn the concepts
Loading whiteboard…
Run or narrate your approach, then ask the coach.