Code RoomMulti-tier cache coherence protocol
HardPrep Room Coding #3432

Multi-tier cache coherence protocol

System designDistributed systemsSenior–Staff~45 min

Design a multi-tier cache-coherence protocol for a product-catalog service that fronts Postgres with three layers: an in-process L1 (per-app-instance, ~5k entries), a shared L2 (Redis cluster), and a CDN edge L3 (~200 PoPs). You run 400 app instances. A price update must be reflected globally within 2 seconds, reads are 50k QPS, writes are 200/s, and stale prices are a compliance problem. Walk through how invalidation propagates across all three tiers, how you avoid a thundering herd on the origin when a hot key is invalidated everywhere at once, and how you bound the inconsistency window.

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.

Clarify5:00 left
Estimate5:00 planned
Design15:00 planned
Deep dive12:00 planned
Failure8:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.