Case Study: Netflix
Netflix: scale and challenges
**Netflix in numbers:** - 230+ million subscribers - 190+ countries - 15% of global internet traffic - 17,000+ titles - 700+ original productions per year **The main technical challenges:** 1. Delivering HD/4K video to millions of viewers at the same time 2. Personalising the experience for each user 3. 99.99% availability 4. Surviving peak load (Friday evening)
**Why does Netflix not use AWS for streaming?** | Factor | AWS CloudFront
| **Cost** | $0.085/GB | ~$0.01/GB | | **Control** | Limited | Full | | **Latency** | Good | Excellent (inside the ISP) | | **Scale** | Shared | Dedicated | Open Connect: Netflix's own boxes inside ISPs - lowest latency, full control.
What did you learn about Netflix scale and challenges?
Video Encoding Pipeline
**From master file to viewer:** One movie becomes 1000+ files: - Different resolutions (480p, 720p, 1080p, 4K, 8K) - Different bitrates (for different network speeds) - Different codecs (H.264, VP9, AV1) - Different audio tracks and subtitles
**Per-title encoding (a Netflix innovation):** Traditionally: one bitrate ladder for every movie. Netflix: analyses each title individually: - Animation (Shrek) compresses better -> lower bitrate - Action with fast motion -> higher bitrate Result: 20% bandwidth savings at the same quality.
What did you learn about the Video Encoding Pipeline?
Adaptive Bitrate Streaming
**ABR (Adaptive Bitrate Streaming)** The client switches between qualities on the fly based on: - Available bandwidth - Buffer level - Network conditions (WiFi vs LTE)
**Netflix ABR innovations:** 1. **Device-aware encoding:** - A phone does not need 4K - A TV needs more detail 2. **Cellular vs WiFi:** - On LTE: more conservative algorithm - On WiFi: more aggressive about pushing quality up 3. **Buffer-based algorithm:** - Looks at buffer occupancy, not only throughput - Fewer rebuffering events
What did you learn about Adaptive Bitrate Streaming?
Open Connect CDN
**Open Connect, the Netflix CDN** - 15,000+ servers across 1000+ locations - Placed inside ISPs (Comcast, Verizon, etc.) - Free for ISPs (it saves them traffic) - Netflix controls the hardware and the software
**Content placement algorithm:**
Popular content goes everywhere. Regional content (for example K-drama) goes only to the matching regions.
What did you learn about the Open Connect CDN?
Recommendation System
**Personalisation is the key to retention** - 80% of what users watch comes from recommendations - $1B+ in saved churn - Every user sees a unique home page
**Personalised artwork:** Not only WHAT to show, but HOW to show it:
Netflix runs A/B tests across thousands of artwork variants for each title.
What did you learn about the Recommendation System?
Microservices and Chaos Engineering
**Netflix were the microservices pioneers:** - 1000+ microservices - Each service is a separate team - Full autonomy ('You build it, you run it') **The catch:** the more services you have, the more failure points you have.
**Chaos Engineering - Netflix invented Chaos Monkey:**
If a system survives Chaos Monkey in production, it will survive real-world outages.
What did you learn about Microservices and Chaos Engineering?