Exercise · Media & Streaming
YouTube / Netflix — Video Streaming
Whiteboard exercise. Try the problem cold, then reveal the rubric to self-score.
Out of 10 points45 min whiteboardReference solution →
01
Prompt
Design YouTube's video delivery. Hundreds of millions of hours/day streamed, 4K support, adaptive bitrate, global latency < 500ms playback-start.
Time budget: 45 min whiteboard. Draw architecture, estimate numbers, discuss tradeoffs.
02
Hints (progressive — click to reveal)
Hint 1
Transcoding ladder: single upload becomes 5–10 renditions (240p through 4K) in multiple codecs (H.264, H.265, AV1).
Hint 2
Adaptive bitrate (HLS / DASH) — manifest file + 6-second segments. Client switches rendition per segment.
Hint 3
Multi-CDN: edge caches serve most traffic. Origin is rarely hit.
03
Rubric — 10 points
- +1 BoE: 500 hours uploaded/min → 720K hours/day; avg bitrate 5 Mbps; ~30 PB/day egress peak
- +2 Transcoding ladder on upload: 240p/480p/720p/1080p/4K × H.264/H.265/AV1; async via GPU farm
- +2 HLS/DASH adaptive bitrate with 6-sec segments; client measures bandwidth, picks next segment's rendition
- +1 Multi-CDN edge caching; origin shield for missed edge queries; cold tail eviction
- +1 Manifest file (.m3u8) + segment URLs; player downloads manifest + segments from CDN
- +1 Pre-encode popular videos to all renditions immediately; long-tail can lazily transcode on first view
- +1 Direct-to-S3 upload; transcoder consumes from queue; 30-min 1080p = ~30 sec GPU transcode
- +1 Metrics + playback analytics: bitrate switches, rebuffers; fed into CDN routing decisions
Self-score: tally the points you would have mentioned unprompted. 7+ is interview-ready on this problem.
04
Red flags (things that tank the interview)
- Streams single 1080p file to all devices (no adaptive)
- Transcodes on playback request
- Origin directly serves viewers (no CDN)
- Uses WebRTC or similar real-time protocol for video-on-demand (wrong tool)
- Ignores codec diversity (H.264 + H.265 + AV1) and client compatibility