Code Room
System designHard
Question
Design the caching layer for a search backend doing 80k QPS where a small set of head queries ('iphone', 'dress') is a huge fraction of traffic, but results are *personalized and freshness-sensitive*: the same query returns different results per user (their location, their LTR features) and results change as inventory/prices update. A naive whole-result cache is wrong (it'd serve one user's personalized list to another) and stale (prices move). What do you cache, at what layer, and how do you invalidate?
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.