CDN Video Delivery: Streaming Architecture
Video Delivery Challenges
Video is the most demanding CDN use case: large files (gigabytes per stream), sustained bandwidth (megabits per second per viewer), real-time requirements (live streaming), and quality expectations (no buffering). CDNs handle 80%+ of global video traffic. For foundational context, read CDN Performance Metrics: What to Measure — FlyFish NWA.
Streaming Protocols
| Protocol | Use Case | Latency | CDN Compatibility |
|---|---|---|---|
| HLS (HTTP Live Streaming) | On-demand + live | 6-30 seconds | Excellent (HTTP-based) |
| DASH (Dynamic Adaptive Streaming) | On-demand + live | 6-30 seconds | Excellent (HTTP-based) |
| CMAF (Common Media Application Format) | On-demand + live | 3-6 seconds | Excellent (HLS + DASH compatible) |
| LL-HLS (Low-Latency HLS) | Low-latency live | 2-4 seconds | Good (requires partial segment support) |
| WebRTC | Real-time communication | < 1 second | Limited (peer-to-peer, not HTTP) |
Adaptive Bitrate Streaming (ABR)
ABR encodes video at multiple quality levels. The player dynamically switches between levels based on available bandwidth:
| Metric | Edge Processing | Origin Processing | Improvement |
|---|---|---|---|
| Latency (p50) | 8–15 ms | 120–300 ms | 15–20x faster |
| Cache Hit Ratio | 85–95% | N/A | Reduces origin load |
| TLS Handshake | 1–5 ms (nearby PoP) | 50–150 ms | 10–30x faster |
| Bandwidth Cost | $0.01–0.04/GB | $0.05–0.12/GB | 3–5x cheaper |
| Availability | 99.99% (multi-PoP) | 99.9% (single DC) | 10x fewer outages |
Bitrate Ladder (example):
360p: 800 kbps
480p: 1500 kbps
720p: 3000 kbps
1080p: 6000 kbps
4K: 15000 kbps
The CDN serves small segments (2-10 seconds each) at the appropriate quality. When the viewer's bandwidth drops, the player requests lower-quality segments. This prevents buffering.
Video CDN Architecture
- Ingest — Origin receives video (upload or live encoder)
- Transcoding — Encode into multiple bitrates and formats
- Packaging — Create HLS/DASH manifests and segments
- CDN distribution — Segments cached at edge PoPs
- Playback — Player fetches manifest, then segments sequentially
CDN Optimization for Video
- Segment caching — Each 2-10s segment is a separate cacheable object. Popular segments have near-100% cache hit rate.
- Manifest caching — Manifests change for live streams but are static for VOD. Cache VOD manifests aggressively.
- Prefetching — CDN can prefetch the next segment while the current one is playing, eliminating cache misses.
- Origin shield — Critical for live streaming: consolidates segment requests from all PoPs to reduce origin load.
- Bandwidth throttling — Serve segments at playback speed + buffer, not at max CDN speed, to reduce bandwidth costs.
Live Streaming Specifics
Live streaming requires special CDN handling:
- Ultra-short TTLs — Live manifest files need TTLs of 1-2 seconds
- Edge origin awareness — CDN must handle rapidly-appearing new segments
- Time-shifted viewing — DVR-like rewind requires keeping recent segments cached
- Geo-restriction — Live sports often have geographic broadcasting rights. See geo-routing.
Video CDN Providers
- AWS CloudFront + MediaLive — Full AWS video pipeline
- Cloudflare Stream — Integrated video encoding and delivery
- Akamai Media Delivery — Largest video CDN by market share
- Fastly — Low-latency video delivery with VCL customization
- Specialized — Mux, Brightcove, Wowza provide end-to-end video platforms