system design · system-design
Design Dynamic Home-Screen Recommendations
Per-profile row construction, ranking, freshness, real-time signal incorporation. 2025 Netflix-reported prompt.
Theory
Explanation
Intuition first, formal definition second. Skim the bullets if you already know this; read the prose if you don't.
Home screen is rebuilt every visit. Combine materialized rows + real-time signals (just finished watching, time of day, device). Per-user artwork variant for each title chosen via bandit. Total latency budget: 200ms for whole home payload.
Home API request. Edge auth + profile lookup. Pull pre-computed materialized rows. Apply real-time overlay: continue-watching position, just-released titles, time-of-day boost. Choose row order via personalized meta-ranker. Per title, pick artwork variant via contextual bandit. Return JSON payload with rows + variants + UI hints.
When to use
Streaming home, e-commerce home, news feed home.
When not to
Static curated pages.
flowchart LR Client([Client]) --> Edge[Home API] Edge --> Auth[Auth] Edge --> Rows[(Materialized Rows · per profile)] Edge --> RT[Real-time Signals · just-watched, time] Edge --> Meta[Meta-Ranker] Edge --> Art[Artwork Bandit] Meta --> Layout[Home Layout] Art --> Layout Layout --> Client
Key insights
- Latency budget 200ms, overlays must be cached or computed inline.
- Artwork chosen per-user via contextual bandit on history of clicks per artwork.
- Continue-watching always top if non-empty.
- Real-time signals stale by ≤30s acceptable.
- Per-device row layout: TV grids different from mobile vertical.