Netflix
Streaming billions of hours of 4K video to 260M+ subscribers
Netflix Architecture Blueprint
Click ▶ RUN to animate active particle streams across microservices
How Traffic Flows Through Netflix
1. Ingress & Edge Routing
User requests arrive at the edge network. Global CDNs cache static assets and media. API Gateways terminate TLS, validate JWT authentication tokens, enforce token-bucket rate limits, and scrub malicious bot traffic before forwarding to internal services.
2. Microservice Processing
Stateless domain services execute core business logic. Microservices communicate via high-performance internal gRPC/REST APIs and autoscaling worker pods, ensuring that high load on one domain never exhausts compute resources of another.
3. In-Memory Caching & Storage
Read-heavy traffic is served from in-memory Redis clusters with sub-millisecond latencies, protecting primary databases. Persistent databases (PostgreSQL, Cassandra, DynamoDB) maintain ACID consistency for financial ledgers, user accounts, and immutable state records.
4. Asynchronous Event Streams
Heavy operations (notifications, audit logging, analytics, ML training, fan-out delivery) are decoupled into durable event logs like Kafka and SQS. This prevents user-facing requests from blocking on slow external networks.
Study Netflix's database schemas, capacity math & production contracts
Beyond the visual blueprint, explore the exhaustive 7-section engineering whitepaper with real DDL schemas, API endpoints, failure mitigation matrices, and 45-minute FAANG interview scripts.
Global Adaptive Bitrate Streaming & Open Connect ISP Appliances
Streaming billions of hours of 4K video across the public internet backbone would cost billions in bandwidth transit fees and cause unacceptable packet loss and buffering.
Netflix engineered custom hardware appliances called Open Connect Appliances (OCAs) and installs them for free directly inside telecom ISP data centers worldwide. 95% of video chunks stream directly from within the user's local telecom network without touching the public internet transit backbone.
⚖️ Architectural Trade-Offs & Decisions
Why the engineering team chose this specific stack over competing alternatives
Millions of viewers generate continuous playhead position checkpoints every few seconds. Relational databases choke on write-heavy append workloads. Cassandra's masterless LSM-tree storage engine handles millions of writes per second across multi-datacenter clusters without locking.
At Netflix's immense bandwidth volume, paying third-party CDNs per gigabyte would bankrupt the business model. Deploying custom FreeBSD servers inside ISPs reduced bandwidth costs by over 90% and gave Netflix total algorithmic control over cache pre-population.
Christmas Eve AWS Region Blackout (2012)
Amazon Web Services US-East-1 region suffered a catastrophic Elastic Load Balancer failure on Christmas Eve, disabling video streaming for millions of families.
Netflix control plane services had single-region dependencies in US-East-1; traffic could not automatically fail over to US-West.
Netflix re-architected its entire infrastructure for multi-region active-active operation, allowing 100% of global traffic to be evacuated from any AWS region in under 7 minutes, and created Chaos Kong to regularly simulate region shutdowns in production.
📋 Complete Microservice Specifications
Every service in the Netflix ecosystem with production tech stacks and failure impact
| Component | Tier / Layer | Tech Stack | Production Function | Status / Chaos |
|---|---|---|---|---|
| Content Studio | CLIENT | StudioS3 Direct | Studios upload raw uncompressed 4K master ProRes video files | |
| Viewer App | CLIENT | SmartTViOSAndroidWeb | Smart TVs, mobile phones, game consoles, and web browsers | |
| Upload Service | SERVICE | GoAWS S3Chunking | Splits giant master video files into small 5-minute chunks for parallel processing | |
| Transcoding Farm | SERVICE | FFmpegEC2 SpotAV1HEVC | Distributed worker fleet converting video into 1,200+ distinct format combinations | |
| Object Storage | STORAGE | AWS S3Glacier | AWS S3 repository storing master chunk archives and video files | |
| Open Connect CDN | CDN | Custom FreeBSDNginxOCAs | Netflix's custom hardware appliances embedded directly inside ISP networks | |
| API Gateway (Zuul) | GATEWAY | Zuul 2EurekaNetty | Intelligent routing, auth token verification, and dynamic traffic filtering | |
| Catalog Service | SERVICE | JavaSpring BootCassandra | Provides title metadata, localization, age ratings, and preview clips | |
| Recommendation Engine | SERVICE | PythonTensorFlowRay | ML model computing personalized rankings, top picks, and dynamic artwork thumbnails | |
| Manifest Service | SERVICE | JavaHLSDASH | Generates customized adaptive bitrate streaming manifests (HLS / DASH) | |
| Cassandra DB | DATABASE | Apache Cassandra | Distributed NoSQL database storing user viewing history, bookmarks, and ratings | |
| Kafka Telemetry | QUEUE | Apache KafkaFlink | High-throughput event bus streaming playback telemetry, buffer health, and QoS metrics |