Design StreamHub VOD and live streaming: creators upload or go live; viewers watch with adaptive bitrate streaming at YouTube scale — 500M hours watched/month, global CDN delivery, under 2 seconds startup latency.
Requirements
Functional requirements
- Upload video files (up to 4K, 12 hours max for VOD).
- Live streaming with under 5 seconds end-to-end latency.
- Adaptive bitrate playback (360p to 4K) based on client bandwidth.
- Thumbnail and preview generation.
- View count analytics and creator dashboard.
- Resume playback from last watched position.
Non-functional requirements
- Scale: 500M hours watched/month; 1M concurrent live streams at peak.
- Upload: Support 10 GB files via multipart upload.
- Playback latency: Under 2 seconds startup for VOD; under 5 seconds for live.
- Availability: 99.99% for playback path.
- Storage: 10M new hours uploaded/month × 5 GB/hour (multi-bitrate) = 50 PB/month raw.
Out of scope: Live chat (separate system), content moderation ML, DRM for premium content.
Estimation
- 500M hours/month × 3600 sec = 1.8T seconds of video/month.
- At 2 Mbps average playback: 1.8T × 2 Mbps ≈ 450 EB/month egress — CDN is mandatory.
- 1M concurrent live streams × 3 Mbps ingest ≈ 3 Tbps ingest at peak — regional ingest clusters.
- Transcode: 1 hour video → ~30 min wall time on 1 GPU → 10M hours/month needs ~200 GPU workers sustained.
Video pipeline (AWS)
The rest of this guide is part of Pro
Free covers every fresher guide in full. Pro unlocks Senior, Staff and Architect guides across every track.
Still to come · 4 sections
- API design
- High-level architecture
- Deep dive: adaptive bitrate streaming
- Deep dive: live streaming path
Test yourself
Answer these before moving on — recall is what makes it stick.