Design a Recommendation ML Pipeline (Media-Focused)

Hard45 min
1 / 30
System design answer

Design a Recommendation ML Pipeline (Media-Focused)

Hard45 min30 sections
understanding•10 min read

Problem Statement: A Watch-Time-Driven Recommendation Pipeline

Frames the system as a media-specific learning pipeline where watch time is the label, episodes create sequential structure, and retention is the true objective.

Problem statement

Design a recommendation ML pipeline for a media streaming platform. The pipeline collects watch logs, partial watch times, skip events, browse behavior, and ratings; engineers features over content metadata such as genre and cast; trains candidate-generation and ranking models; and serves personalized rows on the home screen, detail-page suggestions, a Continue Watching row, and trending rows. It must handle new releases with minimal interaction data, keep serving latency inside the UI budget, and support A/B testing of new algorithms.

This is not a generic e-commerce recommender. Four properties make media special:

  1. Watch time is the primary label. A purchase is binary; a viewing session is a continuous signal measured in minutes. YouTube's 2016 RecSys paper (Covington, Adams, Sargin) describes ranking as weighted logistic regression where the weight is the watch duration, and that single choice reshapes the whole pipeline: negative sampling, calibration, and evaluation all change when the label is minutes, not clicks.
  2. Consumption is sequential and episodic. The catalog is dominated by series with seasons and episodes. The highest-value recommendation is usually not a discovery item at all: it is the next unwatched episode of a series the user already loves. Netflix describes row personalization and 'continue watching' semantics in its engineering blog post 'Learning a Personalized Homepage'.
  3. The real objective is re-engagement. Streaming revenue is subscription-driven, so the north-star metric is weekly and monthly member retention, not a single session's watch time. Netflix executives have publicly stated that roughly 80% of what members watch comes from the recommendation system, which means the recommender is the product.
  4. The catalog churns weekly. New episodes land on a fixed schedule, and brand-new titles arrive with zero interaction history. Cold start is a permanent operating condition, not an edge case.

Public operating baseline

Published figures give us scale anchors. Netflix reported 282.7 million paid memberships at the end of 2024 and its engineering talks describe hundreds of billions of playback and interaction events per day flowing through pipelines such as Keystone. YouTube reports more than 2 billion logged-in monthly users, more than a billion hours watched per day (a figure the company began citing in 2017), and more than 70 billion Shorts views per day in 2024 earnings commentary. Spotify reported 675 million monthly active users in Q4 2024. Hulu carries roughly 50 million subscribers per Disney's FY2025 reporting. These are company-reported numbers; they anchor our intuition, and every design target below that is not tied to such a figure is an explicit assumption.

The four architectural planes

  1. Data plane: device SDKs, event collection, Kafka-style backbone, streaming sessionization, batch feature computation, and a feature store serving both training and online inference.
  2. Training plane: candidate-generation model (two-tower embeddings), ranking model (multi-objective), offline evaluation, model registry, and canaried promotion.
  3. Serving plane: precomputed personal home caches, low-latency feature lookup, ANN retrieval, online ranking, slate assembly, and a degradation ladder.
  4. Experimentation plane: stable assignment, exposure logging, guardrail metrics, and decision tooling.

A strong interview answer keeps these planes separate: the serving plane must survive a training outage for days, the data plane must survive a serving outage without losing a single watch heartbeat, and the experimentation plane must never silently change what a model learned.

Key Highlights

  • •Watch time is a continuous label: it changes negative sampling, calibration, and evaluation versus click-based recommenders.
  • •The highest-value recommendation is usually the next unwatched episode, not a discovery item.
  • •Netflix executives have stated roughly 80% of viewing is driven by the recommendation system.
  • •Retention, not session watch time, is the subscription-business north-star metric.
  • •Four planes: data, training, serving, experimentation. Each must survive the others' outages.
Lead With the Label
Say in the first two minutes that watch time is the label and retention is the objective. That single sentence distinguishes a media pipeline from a generic collaborative-filtering answer.
Do Not Draw a Static Ranker
A media recommender is a continuously learning pipeline with streaming features, weekly cold start, and weekly model refreshes. Drawing one model box and one database is an instant shallow-answer signal.

Section Rescue Kit

Buzzwords to use:

Two-Stage RetrievalWatch-Time-Weighted Ranking

Safe statements:

  • "I will separate what the pipeline learns from what the serving path does, because their availability requirements differ."
  • "Before selecting stores, let me define the four planes and which outage each one must survive."
Design a Recommendation ML Pipeline (Media-Focused) - System Design | WinJob | WinJob