Netflix: 65 million at once
At its biggest live event, Netflix reached 65 million streams at the same moment. You're running one thousandth of that: 65,000 viewers, and 20,000 req/s. Right now every second of video comes through your own servers.
Play this levelFree with an account. It runs in your browser: build the design, press Run, and watch what breaks.
The lesson
Netflix splits its system in two. It says everything before you press play runs in AWS: browsing, recommendations and encoding. Everything after you press play comes from its own CDN, Open Connect, which carries all of its video.
That split is the whole trick. Video is huge but never changes, so copies sit close to viewers. Your servers only answer the small questions, like what to show next.
A player fetches a few seconds of video at a time, so a viewer is a steady stream of small file requests. Here that's 80% of your traffic.
Video starts as one master file. An encoder makes versions for every screen and speed before anyone watches. And if recommendations fail, a viewer should still get to watch, so that service needs a circuit breaker.
What you have to achieve
20,000 requests a second at the busiest hour, 5% of them writes and 80% static files.
- No broken or illegal connections
- Use a CDN
- Use an Object Storage
- Use a NoSQL DB
- Use a Video Encoder
- No component is overloaded
- If every Internal Service machine dies, under 0.1% of requests fail
- Fewer than 0.1% of requests fail
- p99 response time under 250 ms
What you learn
Crash Recommendations: people keep watching. Now look at how little reaches your servers. Almost all the work happens at the edge, close to viewers. When a system looks impossibly big, ask which part truly has to come back to you.
The real numbers behind it
- 65 million streams at once at the Tyson vs Paul fight, November 2024 (Reported: Reporting on Netflix's Tyson vs Paul numbers)
- Open Connect delivers 100% of Netflix's video traffic (Published: Netflix: how we work with ISPs)
- Browsing, recommendations and encoding run in AWS, before you press play (Published: Netflix: how we work with ISPs)
- EVCache, Netflix's cache, handled upwards of 30 million requests a second at peak (Published: Netflix: caching for a global Netflix)
- Netflix asks for 15 Mbps for 4K (Published: Netflix Help: internet speed recommendations)
- 20,000 req/s, 80% video: a player fetching every 4 seconds, plus browsing (Estimate)
- The 95% CDN hit rate here. Netflix doesn't publish one (Estimate)
Check yourself
What does Netflix serve from its own CDN?
- Everything after you press play: the video
- Browsing and recommendations
- Account settings
Show the answer
Everything after you press play: the video. Video is huge and never changes, so copies sit close to viewers. The servers answer only the small questions.
Recommendations crash. What should a viewer see?
- An error page
- The video keeps playing
- A long wait
Show the answer
The video keeps playing. A circuit breaker lets the page carry on without recommendations. Watching matters more.