Code Room
System designHardsd-g367
Subject Online inferenceLevel Senior–Staff~45 minCommon in ML systems · Distributed systems interviewsIndustries Technology, Software development

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.

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