Code Room
System designMedium
Question
Design CDN caching for a news site that gets sudden traffic spikes (10x in minutes when a story breaks) serving mostly static article HTML plus a few personalized fragments. Article HTML can be cached for minutes but must be purgeable within seconds when an editor fixes a factual error. Personalization (logged-in name, region) must not leak between users. Explain your cache-key design, how you protect the origin during a spike, and how you purge fast.
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.