Code RoomCDN caching with traffic spikes
MediumPrep Room Coding #3172

CDN caching with traffic spikes

System designStorage & CDNMid–Senior~35 min

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.

Clarify4:00 left
Estimate4:00 planned
Design11:30 planned
Deep dive9:30 planned
Failure6:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.