Code Room
System designHard
Question
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.
Learn the concepts
Loading whiteboard…
Run or narrate your approach, then ask the coach.