Media

Adaptive Bitrate Video Streaming

Stream video at the highest sustainable quality across heterogeneous networks and devices.

Scale to anchor on

Hundreds of millions of concurrent streams at peak, multi-terabit egress, sub-second startup, near-zero rebuffer.

Requirements

Functional

  • Deliver pre-encoded video in multiple bitrate ladders.
  • Adapt bitrate to client network conditions.
  • Support per-device codecs and DRM.
  • Track playback QoE.

Non-functional

  • Resilience to peering / ISP issues.
  • Bandwidth cost minimization.
  • Sub-second startup time.

High-level architecture

Content is pre-encoded into a bitrate ladder (HLS / DASH manifests). A purpose-built CDN (Open Connect-style) caches popular content close to ISPs. The client downloads short segments and dynamically switches bitrate based on buffer and throughput estimates.

Components

Encoding pipeline
Produces multiple renditions and manifests.
Origin store
Authoritative master copy; CDN backfills from here.
Edge CDN (peering / ISP-collocated)
Serves segments close to end users.
Client ABR algorithm
Chooses next segment bitrate based on buffer and throughput history.
QoE telemetry
Tracks startup, rebuffer, bitrate; feeds quality improvements.

Key decisions

Pre-encoded ladders over real-time transcoding.
Real-time transcoding at this scale is uneconomic; pre-encoding moves cost off the hot path.
ISP-collocated edge.
Egress cost and quality dominate the unit economics; collocation with ISPs solves both.
Client-side ABR.
The client knows its real conditions; server-side adaptation lags reality.
Segments of a few seconds.
Short enough for quick adaptation; long enough to avoid manifest overhead.

Pitfalls

  • Designing for the median client and crashing on weak networks.
  • No QoE telemetry — rebuffer rates invisible to product.
  • Single origin in one region.
  • Underestimating DRM and codec complexity per device.

Follow-up questions

  • How do you handle a popular live event with simultaneous start?
  • How does the CDN handle a popular new release?
  • What's the ABR algorithm's failure mode on lossy networks?
  • How do you measure QoE in a single metric?

Related patterns

Further reading