Code RoomComplementary item retrieval
HardPrep Room Coding #3486

Complementary item retrieval

System designML systemsDistributed systemsSenior–Staff~45 min

Design the online candidate-retrieval stage for an e-commerce 'complete the look' / related-items service that, given an item a user is viewing, must return ~50 complementary items in under 20ms p99 at 25k QPS over a 400M-item catalog. Complementary (goes-with) is different from similar — a shirt should retrieve pants, not other shirts. Walk through the retrieval architecture, how you serve it within the latency budget, and how you keep results fresh as inventory and prices change every minute.

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.