Netflix System Design — Explained Simply
A beginner-friendly walkthrough of how Netflix streams video to 250M+ people worldwide without (usually) buffering.
1. The Big Idea (Read This First)
Netflix is really two separate systems working together:
| Part | What it does | Where it runs |
|---|---|---|
| Control Plane ("the brain") | Login, browsing, search, recommendations, billing, "what should I watch?" | AWS cloud (microservices) |
| Data Plane ("the muscle") | Actually delivering the video bytes to your screen | Open Connect (Netflix's own CDN) |
Analogy: Think of a restaurant. The AWS side is the waiter and menu (takes your order, remembers your preferences). Open Connect is the kitchen next door to your house (the food is already cooked and sitting close to you).
2. High-Level Architecture
┌──────────────────────────┐
│ USER DEVICE │
│ (TV, Phone, Laptop, Web) │
└────────────┬─────────────┘
│
┌──────────────────────┴──────────────────────┐
│ │
(1) Browse / Login / Play click (2) Stream the video
│ │
▼ ▼
┌─────────────────────┐ ┌──────────────────────┐
│ AWS (Control │ │ OPEN CONNECT (CDN) │
│ Plane) │ │ Servers inside your │
│ │ "Play this movie │ ISP / nearby city │
│ • API Gateway │ from THIS server" │ │
│ • Microservices │ ───────────────────▶ │ Stores video files │
│ • Databases │ │ (OCAs) │
│ • Recommendations │ └──────────────────────┘
└─────────────────────┘
Flow in one line: You press play → AWS decides which nearby server is best → your device pulls video directly from that server.
3. What Happens When You Press "Play"? (Step by Step)
- App opens → device calls Netflix API (hosted on AWS).
- Authentication → checks your account, subscription, and device.
- Home screen is built → recommendation services pick rows & thumbnails just for you.
- You click Play → Playback service checks license/DRM rights and region availability.
- Steering service picks the best Open Connect Appliance (OCA) based on location, network health, and server load.
- Device receives a manifest (a list of available video qualities + OCA URLs).
- Video streams in small chunks (a few seconds each) directly from the OCA.
- Adaptive Bitrate (ABR) — if your Wi-Fi slows down, the player automatically switches to a lower quality chunk instead of buffering.
- Telemetry (play, pause, buffering, quality) is sent back to Netflix for analytics.
4. Component Deep-Dive
4.1 Client Apps
- Native apps for iOS, Android, Smart TVs, consoles, and a web app.
- Contain the video player that handles adaptive streaming, DRM, subtitles, and audio tracks.
4.2 API Gateway (Front Door)
- Single entry point for all client requests.
- Netflix originally built Zuul (now evolved into Zuul 2, plus a federated GraphQL gateway).
- Does: routing, authentication, rate limiting, request filtering, load shedding.
4.3 Microservices (the heart of AWS side)
Netflix pioneered splitting one big app into hundreds of small services, each doing one job:
┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐
│ User │ │ Catalog │ │ Search │ │ Recommend │
│ Service │ │ Service │ │ Service │ │ Service │
└────────────┘ └────────────┘ └────────────┘ └────────────┘
┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐
│ Billing │ │ Playback │ │ Watchlist │ │ Notification│
│ Service │ │ Service │ │ Service │ │ Service │
└────────────┘ └────────────┘ └────────────┘ └────────────┘
Why? Teams can deploy independently, scale only what's busy, and one failure doesn't take everything down.
Supporting tools:
- Eureka – service discovery ("where is the Billing service right now?").
- Client-side load balancing (originally Ribbon) – callers choose a healthy instance.
- Resilience patterns (circuit breakers, retries, timeouts — popularized by Hystrix, now replaced by adaptive concurrency limits).
4.4 Open Connect (Netflix's Own CDN) ⭐
This is the secret sauce.
- Netflix builds its own servers called OCAs (Open Connect Appliances).
- They are placed inside ISPs' data centers and at internet exchange points, for free.
- Popular content is pre-loaded at night (off-peak) so it's already sitting close to viewers.
Without CDN: You ───────── (long distance) ───────── Netflix Data Center
With Open Connect: You ── (short hop) ── OCA inside your ISP ✅
Benefits:
- Lower latency and fewer buffering issues.
- ISPs save bandwidth on their backbone.
- Netflix controls the full delivery experience.
Fill strategy: Content is proactively pushed to OCAs based on predicted popularity per region — not fetched on demand like a typical cache.
4.5 Video Processing / Encoding Pipeline
When a studio gives Netflix a movie, it's a huge raw master file. Netflix converts it to work on every device and network speed:
Raw Master File
│
▼
┌──────────────┐ split into small chunks
│ Chunking │──────────────────────────┐
└──────────────┘ │
▼ ▼
┌──────────────────────────────────────────────┐
│ Parallel encoding on thousands of AWS │
│ machines: many resolutions × bitrates × │
│ codecs (H.264, HEVC, VP9, AV1) │
└──────────────────────────────────────────────┘
│
▼
┌──────────────┐
│ Quality check│ (automated, uses VMAF quality metric)
└──────────────┘
│
▼
Distribute to Open Connect servers worldwide
Smart tricks:
- Per-title / per-shot encoding: An animated cartoon needs fewer bits than an action movie, so each title (and even each scene) gets its own optimal settings.
- Multiple audio tracks, subtitles, and artwork are also processed.
- DRM (Widevine, PlayReady, FairPlay) protects the content.
4.6 Adaptive Bitrate Streaming (ABR)
- Video is stored as many small segments (2–10 seconds) in multiple quality levels.
- Protocols: MPEG-DASH / HLS.
- The player measures your network speed and picks the best quality for each next segment.
Fast network: [4K][4K][4K][4K]
Slow dip: [4K][1080p][720p][480p]
Recovered: [720p][1080p][4K]
4.7 Data Storage (Different Tools for Different Jobs)
| Data type | Technology | Why |
|---|---|---|
| User profiles, viewing history, huge-scale data | Apache Cassandra | Highly available, scales across regions, no single point of failure |
| Billing / transactions | MySQL (relational) | Needs strong consistency (ACID) |
| Super-fast caching | EVCache (built on Memcached) | Millisecond reads; reduces DB load |
| Search & logs | Elasticsearch | Full-text search, analytics |
| Videos, images, big files | Amazon S3 | Cheap, durable object storage |
| Distributed config/metadata | Various in-house stores | — |
Rule of thumb: No single database fits everything → use the right tool for each job (this is called polyglot persistence).
4.8 Recommendation System 🎯
Netflix says most of what people watch comes from recommendations.
Inputs:
- What you watched, how long, when, on what device
- Searches, ratings, thumbs up/down
- Behavior of similar users
- Content metadata (genre, cast, mood, language)
Techniques:
- Collaborative filtering
- Deep learning / embeddings
- Contextual bandits (to test which choice works best)
- Personalized artwork – the same show may show you a different thumbnail than your friend.
Pipeline:
Offline (batch) → Train models on huge data (Spark) → Store results
Nearline → Update with recent activity → Fast refresh
Online (real-time)→ Re-rank results in milliseconds → Your home page
4.9 Data & Event Pipeline
Every click, play, pause, and buffer event is recorded.
Devices & Services → Kafka (event streaming) → Flink / Spark (processing)
│
┌──────────────────────┼───────────────────┐
▼ ▼ ▼
Data Lake (S3) Real-time dashboards ML training
Used for: recommendations, A/B tests, detecting playback problems, capacity planning, business reports.
4.10 Experimentation (A/B Testing)
Netflix constantly runs thousands of experiments: Does this thumbnail increase plays? Does this UI change help? Nothing major ships without data.
5. Resilience: Designing for Failure 💥
Netflix assumes things will break and builds around it.
| Technique | Meaning |
|---|---|
| Multi-region deployment | Runs in multiple AWS regions; traffic can fail over if one region dies |
| Circuit breakers | Stop calling a failing service so it doesn't drag everything down |
| Fallbacks | If recommendations fail, show a generic popular list instead of an error |
| Bulkheads | Isolate resources so one overloaded part can't sink the rest |
| Load shedding | Under extreme load, drop low-priority requests to protect critical ones (playback > browsing) |
| Timeouts & retries | Don't wait forever; retry safely |
Chaos Engineering 🐒
Netflix intentionally breaks its own systems in production to find weaknesses:
- Chaos Monkey – randomly kills servers.
- Chaos Kong – simulates losing an entire AWS region.
- Simian Army / FIT – more failure-injection tools.
If it can survive random failures on purpose, it can survive real ones.
6. Scalability Strategies
- Horizontal scaling: add more instances instead of bigger machines.
- Auto Scaling Groups: traffic spikes (e.g., Friday evening, new season drops) automatically add servers.
- Stateless services: any instance can handle any request.
- Caching everywhere: EVCache, CDN, client-side caches.
- Geo-distribution: serve users from the nearest region/OCA.
- Asynchronous processing: non-urgent work is queued instead of blocking the user.
7. DevOps & Observability
| Need | Tool |
|---|---|
| Continuous delivery / deployments | Spinnaker (open-sourced by Netflix) |
| Canary releases | Roll out to a tiny % of users first, compare metrics, then expand |
| Metrics & monitoring | Atlas (time-series metrics), plus alerting |
| Distributed tracing | Trace a request across hundreds of services |
| Logging | Centralized logs + Elasticsearch |
| Infrastructure | Everything as code on AWS (EC2, S3, etc.) |
8. Security
- Authentication & authorization at the gateway (tokens, device identity)
- DRM to prevent piracy
- Encryption in transit (TLS) and at rest
- Account sharing / abuse detection via device & usage signals
- Zero-trust style internal service-to-service auth (mutual TLS)
9. Complete Architecture (One Diagram)
┌─────────────────────────┐
│ USER DEVICES │
└─────┬─────────────┬─────┘
API calls│ │Video chunks
▼ ▼
┌───────────────┐ ┌──────────────────┐
│ API Gateway │ │ OPEN CONNECT │
│ (Zuul/GraphQL)│ │ OCAs in ISPs │
└──────┬────────┘ └────────▲─────────┘
│ │ pre-fill
┌───────────────────┼───────────────┐ │ (nightly)
▼ ▼ ▼ │
┌──────────┐ ┌────────────┐ ┌──────────┴─┐
│ User/Auth│ │ Playback & │ │ Encoding & │
│ Billing │ │ Steering │ │ Content │
│ Services │ │ Services │ │ Pipeline │
└────┬─────┘ └─────┬──────┘ └──────┬─────┘
│ │ │
┌────┴───────────────────┴────────────────┴────┐
│ Recommendation • Search • Catalog • Watchlist │
└────┬────────────────────────────────────┬─────┘
│ │
┌────▼─────┐ ┌──────────┐ ┌───────┐ ┌──▼────────┐
│ EVCache │ │Cassandra │ │ MySQL │ │ S3 / ES │
└──────────┘ └──────────┘ └───────┘ └───────────┘
▲
│ events
┌────┴────────────────────────────────────────────┐
│ Kafka → Flink/Spark → Data Lake → ML / Analytics│
└─────────────────────────────────────────────────┘
10. Key Design Decisions & Trade-offs
| Decision | Why Netflix chose it | Trade-off |
|---|---|---|
| Microservices | Independent scaling & deployment | Complexity, needs great tooling |
| Own CDN (Open Connect) | Control quality & cost at huge scale | Big hardware investment |
| Cassandra (eventual consistency) | Always available, multi-region | Not ideal for strict transactions |
| Cloud (AWS) | Elastic capacity, no data-center management for control plane | Cloud cost & vendor dependence |
| Chaos engineering | Finds weaknesses early | Requires cultural maturity |
| Pre-positioned content | Smooth streaming at peak | Needs good popularity prediction |
11. Quick Interview Cheat-Sheet 📝
If asked "Design Netflix" in an interview, hit these points:
- Requirements: upload/process videos, stream with low latency, search, recommendations, global scale.
- Split control plane vs data plane.
- Video pipeline: chunk → encode into many formats → store.
- CDN is critical — push popular content to edge servers.
- Adaptive bitrate streaming (HLS/DASH).
- Microservices + API gateway.
- Right database per use case (Cassandra, MySQL, cache, S3).
- Recommendations via offline + online ML.
- Resilience: multi-region, circuit breakers, chaos testing.
- Observability & A/B testing.
12. Glossary
| Term | Simple meaning |
|---|---|
| CDN | Network of servers placed near users to deliver content quickly |
| OCA | Netflix's custom video-serving server |
| ABR | Player auto-adjusts quality based on network speed |
| Microservice | A small independent service that does one job |
| API Gateway | The front door that routes all requests |
| Service discovery | A directory to find where services are running |
| Circuit breaker | Stops calling a broken service to prevent cascading failure |
| Polyglot persistence | Using different databases for different needs |
| Canary release | Releasing a change to a small group first |
| Chaos engineering | Deliberately causing failures to test resilience |
| DRM | Technology that protects content from piracy |
📌 Summary in 3 Lines
- AWS microservices handle everything except video bytes (login, browse, recommendations, playback decisions).
- Open Connect CDN delivers the actual video from servers placed right inside your ISP.
- Resilience, data pipelines, and ML personalization tie it together so streaming feels instant, reliable, and tailored to you.
Note: Netflix's internal stack evolves constantly; some tools named here (e.g., Hystrix, Ribbon) have been replaced or deprecated in favor of newer internal solutions, but the architectural ideas remain the same.