Home › Scenarios › Video streaming CDN
System design scenario
Design a video streaming CDN (like YouTube or Netflix)
Warm-up
Two million segment requests per second, almost all reads, served from a distant origin whose latency varies a lot.
▶ Simulate this designThe goal
Keep p99 < 80 ms and error rate < 0.10% at 2,000,000 req/s for 10s.
- Peak load
- 2,000,000 requests per second
- Traffic mix
- 100% reads, 0% writes
- p99 latency
- under 80 ms
- Error rate
- under 0.10%
The starting architecture
The simulator opens with this design. It is deliberately too weak for the goal: run it and watch which component saturates first.
- Origin LB (Load Balancer, 4 instances): Load balancer in front of the origin fleet.
- Origin servers (Service, 300 instances): Origin servers that package and serve segments; far from users and with a long latency tail.
- Segment store (Database): Object store holding encoded video segments.
How to approach it
The hints unlock one at a time in the app. Try the design yourself before reading them.
Show the hints
- Video segments are immutable: they are perfect for edge caching.
- p99 is decided by the slowest 1%: with a 95% hit ratio, the 5% of misses still set your p99.
- Push the CDN hit ratio above 99% so the slow origin path falls outside the p99.
What the simulator shows you
SimLoad models every component as a queue with real capacity, latency, timeouts and retries, so you see utilisation, p50/p99 latency, errors and monthly cost change as you scale. Insights name the bottleneck in plain language, and the capacity planner sizes the fix. A reference solution that meets the goal is verified by automated tests.
▶ Try it in the simulator