Video Streaming
Serve petabytes of video to the planet without buffering.
Absorb a viral-video surge at the edge so the origin barely notices — and keep cost down.
A handful of hot videos dominate. Origin egress is the expense; a high CDN + cache hit ratio is the whole game. Let traffic reach the origin and both your latency and your bill explode.
Components in play
- Edge CDN — Serves video segments close to viewers.
- Origin cache — Shields the origin from CDN misses.
- Origin servers — Serve and sign segment requests on a miss.
- Object store — Holds the transcoded blobs.
Graded on these SLOs
- ≥ 99.00%Playback succeeds
- ≤ 80 msSegment p99
- ≥ 20k rpsFeed every stream
- ≤ 85%Origin headroom
- ≤ 8Edge, not iron
The brief
Design a video platform like YouTube or Netflix: upload, transcode, and stream video globally with adaptive quality. The system is enormously read-heavy and bandwidth-bound, with a few popular videos dominating traffic.
Functional
- Upload and transcode to multiple bitrates
- Adaptive-bitrate streaming
- Browse/search + view counts
Non-functional
- Global, massive read scale
- Minimize origin bandwidth (cost)
- Smooth playback under load
Read the deep dive
18 min readA video platform is the purest read-heavy, bandwidth-bound system in the interview canon. The catalog is enormous and mostly cold, but at any moment a handful of clips are white-hot: a trailer drops, a clip goes viral, and a few hundred thousand people request the exact same four-second segment within the same minute. If those requests reach your origin servers and object store, both your tail latency and your bandwidth bill detonate. The entire engineering problem is to make sure they almost never do. This guide builds the design the SysGym simulator grades you against. The scenario offers a baseline of 20,000 segment requests per second that ramps to 4x during a viral surge, then injects three failures back to back: an origin node dies, the object store blips, and a CDN edge degrades. Your job is to keep playback succeeding at 99 percent or better, hold segment p99 under 80 ms, sustain at least 20,000 segment requests per second, keep the origin under 85 percent saturation, and do it all on a footprint of eight instances or fewer. Hit every one of those and you arrive, naturally, at the reference architecture: a high-hit-ratio CDN in front of an origin cache in front of a small, asynchronous origin, all reading immutable adaptive-bitrate chunks from object storage.
Warm-up: design decisions
Optional theory to prime the calls a senior engineer would make before you build.
Solving is a Pro feature
Unlock the on-canvas AI design coach, per-run design reviews, the chaos simulator and all 12 problems for $15/month.
- AI design coach on your canvas — pins failure points & over-engineering
- Honest AI design review on every run
- All 12 problems + unlimited chaos simulator
- Points, levels & leaderboard