Code RoomPersonalized search result caching
HardPrep Room Coding #3468

Personalized search result caching

System designDistributed systemsSenior–Staff~45 min

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.

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.