Back-of-Envelope: Video Streaming Bandwidth
mediumEstimating bandwidth and storage for video streaming is a different muscle from tweets. The dominant metric is concurrency — how many users watch simultaneously — multiplied by average bitrate, giving aggregate egress. Netflix scale is the worked example.
Key Concepts
Approach
Step 1 — Concurrency:
Peak concurrent streams = 100M.
Avg bitrate (mixed HD/SD) = 5 Mbps.
Egress = 100M × 5 Mbps = 500 Tbps.
Step 2 — Storage of catalog:
18K titles × 1.5h × ladder of 5 bitrates × 2 codecs = 30 encodings.
HD @ 5 Mbps × 1.5h = ~3.4 GB; avg across ladder ~2 GB.
18K × 30 × 2 GB = ~1 PB. Add AV1 + audio = ~2-3 PB.
Step 3 — CDN:
500 Tbps / 1,000 PoPs = 500 Gbps/PoP avg.
Each cache server: 50-100 Gbps. PoP = 10-100 servers.
Step 4 — Cache hit rate:
Zipf: top 500 titles → 80%+ hit rate.
Miss → regional shield → origin. <1% origin egress.
Step 5 — Upload + transcode:
New titles × master size ~1 Tbps upload.
Transcoding CPU: often the dominant compute cost.
Sanity checks
- 500 Tbps > inter-continental peering of most ISPs. Must use in-network CDN.
- 2-3 PB catalog fits on 30-50 servers — storage trivial vs distribution.
- Top 0.1% of titles = ~30% of traffic. Cache effectiveness depends on Zipf.
- Origin egress < 1% with good cache hit rate. Origin is for cold/long-tail.
- Compare with Netflix actual: ~15% of global internet traffic at peak.
Pattern
- Define concurrency target (peak, not average).
- Pick bitrate distribution and average.
- Egress = concurrency × avg bitrate.
- Storage = titles × duration × bitrate × ladder × codecs.
- CDN math: PoP count × per-PoP capacity ≥ egress.
- Cache hit rate driven by Zipf and cache size.
- Identify dominant cost: usually CDN egress + transcoding compute.
Bitrate ladder
240p: 235 kbps
360p: 375-560 kbps
480p: 750 kbps - 1 Mbps
720p: 1.5-3 Mbps
1080p: 3-6 Mbps
4K: 12-16 Mbps
HDR adds ~30%
Per-shot encoding (Netflix): variable bitrate per scene → ~20% bandwidth saving
Adjustments by product
Live streaming: lower concurrency typically but tighter latency budget (<5s for live sports).
Short-form (TikTok, YT Shorts): massive concurrency, lower per-stream bitrate (≤3 Mbps).
User-generated (YouTube): catalog dwarfs Netflix; storage cost matters more.
Sports/Events: predictable spikes; pre-warm CDN.
Education / corporate: smaller scale; commercial CDN sufficient.