Code Room
System designMediumsd-g575
Subject System designLevel Mid–Senior~40 minCommon in Distributed systems interviewsIndustries Software development, Technology

Question

Design a read-through cache layer sitting between an API tier and a primary database for a product-catalog service. Traffic: ~120K reads/sec, ~2K writes/sec (95% reads), data is ~80% read-mostly product records but ~20% has frequent price/inventory updates. Requirements: cache reads to cut DB load by 10x+, keep cached data fresh within seconds of a write, survive a cache-node failure without overwhelming the DB, and avoid serving wildly stale prices. p99 read latency target <15ms.

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.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.