Code Room
System designHard
Question
Design the full candidate-generation → re-ranking pipeline for a recommendation feed over a corpus of 1B items for 300M users, returning a feed of 50 items in under 150ms. You can't score 1B items per request, so describe the funnel: how each stage narrows the corpus, what model/index each stage uses, and how you keep the stages from fighting each other (e.g. the re-ranker can only re-rank what generation surfaced). Where does business logic / diversity / freshness get injected?
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.