System Design Case Study

How does Netflix deliver 4K HDR video without buffering to 230M+ subscribers globally?

?? Design adaptive bitrate streaming for 230M users with <0.1% rebuffer rate
Concepts Involved

Problem Statement

How does a streaming platform deliver 4K HDR video to 230M+ subscribers globally without buffering, adapting quality in real-time to each viewer's bandwidth while minimizing rebuffer events to <0.1% of sessions?

Core challenge: A user's bandwidth fluctuates constantly (WiFi ? cellular ? tunnel). The player must predict bandwidth, pre-buffer segments, and switch quality seamlessly · all without visible artifacts or interruption.
230M+
subscribers
190+ countries
<0.1%
rebuffer rate
target per session
15%+
of global internet traffic
peak hours
8+
quality levels
240p ? 4K HDR

High-Level Architecture

Content preparation ? CDN distribution ? adaptive client playback

LAYER 1: ENCODING · Upload ? Transcoding Pipeline (~1200 versions per title) Upload mezzanine file (master quality) 4K HDR source uncompressed ~100GB/title Transcoding Pipeline 8+ resolutions (240p ? 4K) · 3 codecs (H.264, H.265, AV1) · HDR variants (SDR, HDR10, Dolby Vision) = ~1200 encoded versions per title per-shot encoding (VMAF optimized per scene) priority: live events > new releases > VOD catalog Output Artifacts 2-4 second segments (chunked) HLS/DASH manifest (quality ladder) DRM encrypted (Widevine/FairPlay/PlayReady) per-title bitrate ladder (custom per content) animation: less bitrate than action LAYER 2: DELIVERY · CDN (Open Connect, 17K+ edge servers) ? Adaptive Bitrate Selection Open Connect CDN 17,000+ edge servers in 6000+ ISP locations 95%+ traffic served from edge (in-ISP) pre-positioned during off-peak (predict popularity) tiered: edge ? regional ? origin (S3) 100+ Tbps total capacity, BGP anycast routing zero transit cost (embedded in ISP) Adaptive Bitrate (HLS/DASH) manifest lists all quality levels + segment URLs client picks quality based on bandwidth estimate EWMA bandwidth estimation (last N segments) buffer-based: low buffer ? drop quality aggressively hysteresis: avoid oscillating between levels seamless mid-stream quality switch LAYER 3: PLAYBACK · Client Player (buffer-based ABR) ? Quality Metrics ? Telemetry Client Player (ABR Engine) buffer-based + throughput-based hybrid algorithm bandwidth estimation (EWMA of segment downloads) seamless quality switch mid-stream (no interruption) pre-buffer next episode (predictive prefetch) start conservative (fast start) ? ramp up quality device-aware: no 4K to phone on cellular Quality Metrics & Telemetry rebuffer rate <0.1% (key SLA) time to first frame <2 seconds per-segment: bitrate, buffer level, VMAF score real-time dashboards + ML for ABR improvement A/B test ABR algorithms per device cohort historical BW per user/ISP for start quality telemetry feeds CDN steering + ABR tuning Per-title encoding: animation needs less bitrate than action | Buffer-based: switch quality on buffer level not just bandwidth 15%+ of global internet traffic at peak | 17K+ edge servers | <0.1% rebuffer | ~1200 encodes/title | AV1 = 30% better compression

Adaptive Bitrate (ABR) Algorithm

The client-side brain that decides quality for each segment

SignalWhat It MeasuresHow It's Used
ThroughputDownload speed of last N segments (EWMA)Upper bound on selectable bitrate
Buffer LevelSeconds of video buffered aheadLow buffer ? drop quality aggressively
VMAF ScorePerceptual quality metric per encodeChoose encode with best quality/bitrate ratio
DeviceScreen resolution, HDR capabilityDon't send 4K to a phone on cellular
Network typeWiFi vs cellular vs ethernetMore conservative on cellular (data caps)
Netflix's approach: Buffer-based + throughput-based hybrid. Start conservative (low quality, fast start). Ramp up as buffer fills. Drop immediately if buffer drains below threshold. Per-shot encoding means a dark scene at 2Mbps looks as good as a bright scene at 8Mbps · ABR picks the optimal encode per scene.
Key metrics: Time to first frame <2s. Rebuffer rate <0.1%. Quality switches minimized (hysteresis). Start bitrate based on historical bandwidth for that user/device/ISP.
Anti-patterns: Throughput-only ABR · oscillates wildly. Fixed quality · buffers on slow networks. No hysteresis · constant quality switching is jarring. Same encode ladder for all content · wastes bits on simple scenes.

Scaling & Key Decisions

ChallengeNetflix SolutionWhy
Global deliveryOpen Connect (own CDN in ISPs)Lower latency than third-party CDN, no transit costs
Encoding costPer-shot encoding + VMAF optimization20% bandwidth savings at same quality
Peak trafficProactive cache fill (predict what's popular)Pre-position content before demand spike
DRMWidevine (Android/Chrome), FairPlay (Apple), PlayReady (Windows)Studio requirements for premium content
Codec evolutionAV1 (newest), VP9, H.265, H.264 (legacy)AV1 = 30% better compression, rolling out per device
PersonalizationDifferent artwork + trailers per userA/B tested thumbnails increase click-through 20-30%
Real-world: Netflix serves 15%+ of global internet traffic at peak. Open Connect has 17,000+ servers. Per-shot encoding saved 20% bandwidth. AV1 codec rolling out for 30% more compression. Each title encoded into ~1200 versions (resolution · bitrate · codec · HDR).

Interview Cheat Sheet

The 8 things to say for video streaming design

1. Adaptive Bitrate (ABR) · client measures bandwidth, requests appropriate quality segment
2. HLS/DASH manifest · playlist of segment URLs at multiple quality levels, client picks
3. CDN (Open Connect) · 17K+ edge servers, content pre-positioned during off-peak
4. Per-title encoding · each title gets custom bitrate ladder (animation needs less than action)
5. Buffer-based algorithm · switch quality based on buffer level, not just bandwidth estimate
6. Rebuffer rate <0.1% · the key quality metric (users leave after 2s of buffering)
7. Pre-positioning popular content · push to edge during off-peak, serve locally at peak
8. Multi-codec strategy · H.264 (compatibility) ? H.265 (4K) ? AV1 (next-gen, 30% savings)