System Design
Video Streaming
Design the video playback and delivery system for a streaming service like Netflix or YouTube.
Functional requirements
- Creators/content team can upload source video files (up to 4K), which the system processes and makes available for playback.
- Viewers can stream videos on demand across heterogeneous devices (mobile, web, smart TV) and network conditions, with playback quality adapting automatically.
- Viewers can seek to arbitrary positions in a video and resume playback where they left off across devices.
- The system tracks playback position/heartbeats for resume and basic view accounting.
- Newly uploaded videos become playable within 30 minutes of upload completing (popular-title priority allowed).
Non-functional requirements
- Availability over consistency for the playback path: a viewer should always be able to start a stream, even if metadata (view counts, resume position) is slightly stale.
- Time-to-first-frame under 2 seconds at p95; rebuffer ratio under 0.5% of watch time.
- Source masters are durable (11 nines target); a lost master is unrecoverable, but derived renditions may be regenerated.
- Content must be protected: streams served only to entitled users, with signed/expiring access to media segments; DRM assumed available as a component.
- Transcode pipeline must be reliable: a failed job never silently drops a video; retries and idempotency required.
Scaling & constraints
- 200M MAU, 60M DAU; average viewer watches 90 minutes/day.
- Peak concurrent streams: ~15M globally, heavily skewed to evening hours per region.
- Catalog: 500K titles today, 5K new uploads/day; average source file 20 GB (raw master).
- Popularity is extremely skewed: top 1% of titles account for ~70% of watch hours; long tail is rarely watched but must remain playable.
- Viewers are globally distributed across 6 continents; assume commercial CDN and/or ability to deploy edge caches.
- Read:write is extreme: one upload can serve millions of streams.
Out of scope
- Recommendation, search, and browse/home-page systems.
- Live streaming and real-time broadcast.
- Comments, likes, social features, and creator monetization/analytics.
- Payment, subscription, and account management (assume an auth/entitlement service exists).
Sign in to save your progress
AI design evaluation
Get a grounded score, what your design does well, its gaps, and what to study next.
Sign in to get AI feedback on your design.