Code Room
System designHard
Question
Design the ranking service for a social feed with 400M daily active users where each session must rank ~500 candidate posts down to a scrolling feed in under 200ms p95. Ranking must balance multiple objectives (predicted like, comment, share, watch-time, and a 'don't show me this' negative signal) into a single ordering, respect integrity demotions, and adapt within a session as the user scrolls. Cover the model architecture, how you combine objectives, the serving path, and how you measure whether a ranking change is actually good.
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.