πŸ’¬
βœ‰οΈ
πŸ“Έ
▢️

Loading…

Design Netflix: adaptive streaming and CDN delivery

NetflixGuided Mode

Adaptive Bitrate: Quality Without Buffering

The CDN hosts every title at multiple quality tiers β€” 240p, 480p, 720p, 1080p, 4K. The Adaptive Streaming Engine running inside the player decides which tier to request for each 2-second segment, continuously adapting as the viewer's network conditions change.

Request Flow

1

Buffer-first algorithm

The Adaptive Streaming Engine monitors two signals: current buffer fill (seconds of video pre-downloaded) and the measured download speed of recent segments. It targets keeping the buffer above a safety threshold β€” typically 15 seconds β€” before upgrading quality.

2

Quality upgrade path

Good network: buffer fills fast β†’ Adaptive Streaming Engine upgrades from 720p β†’ 1080p β†’ 4K over 3-5 segments. Each upgrade adds ~4s of buffer fill time. The algorithm never jumps more than one tier per segment request to avoid oscillation.

3

Graceful degradation

Network degrades (train enters tunnel, mobile hand-off): buffer starts draining. The Adaptive Streaming Engine drops quality immediately β€” 4K β†’ 720p in one step β€” to refill the buffer. A viewer sees quality drop for ~4 seconds rather than a buffering spinner.

Key Insight

The CDN stores every title at 6-8 quality levels. ABR decides which level to request per segment, every 2-4 seconds. Stable buffer > maximum quality β€” a viewer would rather watch 1080p smoothly than see 4K freeze.

Step 3 of 7