Video Streaming Cheat Sheet
Key concepts, trade-offs, and quick-reference notes for your interview prep.
ABR: HLS (.m3u8 + .ts) vs DASH (.mpd + .m4s)
#1💡 We serve HLS to Apple clients and DASH to Android and smart TVs. Generating both costs 5% more transcoding time but removes all compatibility gaps.
Transcoding: Split, Parallel Encode, Merge
#2CDN: 95%+ Cache Hit Ratio, Origin Pull vs Push
#3💡 CDN is the single biggest performance lever in this design. Without it, every view hits the origin. With 46K views/sec at 2.5 MB/sec per stream, that is 115 TB/sec of bandwidth from the origin alone.
Video Chunking: 2-10 Sec, GOP-Aligned Segments
#4Resumable Upload: Chunked Protocol, Byte Offset Tracking
#5💡 We require resumable uploads for files over 100 MB. A single dropped connection without resume means re-uploading the entire file from scratch.
Storage: 500 hrs/min Uploaded, 25 GB/sec Ingress
#6Bitrate Ladder: 240p (300 Kbps) to 4K (20 Mbps)
#7💡 We do not use a fixed bitrate ladder for all content. Per-title encoding adds compute cost at upload time but saves significantly on long-term storage and bandwidth.
View Count: Kafka Async, Batch Update Every 30 Sec
#8Metadata: ~10 KB/Video, Sharded by video_id, Redis Cached
#9💡 Metadata is tiny compared to video content (10 KB vs 500 MB per video). We keep it in a relational database for ACID guarantees and cache aggressively in Redis. The bottleneck is never metadata storage, always video bandwidth.