Code Room
System designMediumsd-g352
Subject RankingLevel Mid–Senior~40 minCommon in ML systems · Distributed systems interviewsIndustries Technology, Software development

Question

Design the real-time *engagement-feature* pipeline that feeds a search ranker: the ranker uses features like 'this item's click-through rate over the last 1 hour / 24 hours / 7 days' and 'this item's add-to-cart rate today', and these counters must update within seconds of user events so a suddenly-popular item ranks up quickly. You have millions of items and 200k engagement events/sec. How do you compute and serve these time-windowed counters at low latency, and how do you keep them from being gamed or skewed by a single burst?

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.