Code Room
System designHard
Question
Design a search-relevance ranking system for a marketplace search over 100M listings handling 20k queries/sec with a 200ms p99 budget. It must combine lexical and semantic retrieval, learn relevance from click logs, support business constraints (sponsored placement, seller diversity, freshness), and let merchandisers tune ranking without redeploying. Cover retrieval, the learning-to-rank layer, training-label generation, and the offline/online evaluation story.
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.