Design a video recommendation system
RedditMachine Learning Engineer · OnsiteLast updated
This question evaluates ML system design competencies for a Machine Learning Engineer, covering infrastructure architecture, logging and observability, feature pipelines, model training/evaluation, serving reliability, and privacy-aware data practices within the ML System Design domain.
Scenario
You are designing an ML-driven video recommendation product (home feed + “up next”) for a consumer app.
The interviewer focuses heavily on infrastructure and logging/observability.
Requirements
- Serve personalized recommendations with low latency.
- Handle both:
- Home feed (rank a set of candidates)
- Next video (contextual/session-based)
- Support rapid iteration (new models/features) and safe experimentation.
What to cover
- High-level architecture: offline training pipeline, online serving, candidate generation + ranking.
- Data & logging design:
- What events to log (impressions, clicks, watch time, skips, likes, shares, follows, dwell, scroll depth, etc.)
- How to uniquely identify an “impression” and join it to outcomes
- How to avoid common logging pitfalls (position bias, missing-not-at-random, duplicate events)
- Feature pipelines:
- Batch vs streaming features
- Feature store (online/offline consistency)
- Model training & evaluation:
- Labels and objectives (CTR, watch time, completion, satisfaction)
- Offline metrics and online A/B testing
- Serving infra & reliability:
- Latency budget, caching, fallback behavior, graceful degradation
- Monitoring, alerting, model/data drift detection
- Privacy & compliance considerations in logging and retention.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.