Skip to main content
BLUEPRINT #01Production Case Studies

Design Netflix's Global Video Streaming & Zuul API Architecture

Target AWS Architecture:DynamoDBAPI GatewayRoute 53
10-Stage Structure:1. Requirements→2. Sizing→3. Topology→4. Data Model→5. AWS Topology→6. Deep-Dive→7. Failures→8. SRE Playbooks

1. Problem Statement & Scope Clarification

System Mission

Design the global video streaming and API gateway infrastructure for Netflix, serving 250M+250\text{M}+ paid subscribers across 190+190+ countries. The platform must handle continuous high-throughput video delivery (250+Β Tbps250+\text{ Tbps} peak egress), millisecond-tier API routing across multi-region AWS infrastructure, automated regional evacuation during AWS catastrophic outages, and resilient distributed caching.

Functional Requirements

  1. User Profile & Content Discovery API: Serve personalized movie recommendations, playback state bookmarks, and search queries with P99<20Β msP99 < 20\text{ ms}.
  2. Dynamic Ingress API Gateway (Zuul 2): Route, filter, rate-limit, and decrypt client requests at the network edge with async non-blocking I/O.
  3. Multi-Region Active-Active Traffic Evacuation: Automatically evacuate 100%100\% of user traffic from an impaired AWS region (e.g., us-east-1 to us-west-2 or eu-west-1) within <7Β minutes< 7\text{ minutes} without user disruption.
  4. Global Video Delivery via Open Connect (CDN): Deliver chunked adaptive bitrate video streams (HLS / DASH) from custom Open Connect Appliances (OCAs) deployed directly inside ISP networks.

Non-Functional Requirements (SLAs & SLOs)

  • High Availability: 99.999%99.999\% uptime for video playback initialization.
  • Ultra-Low Edge Latency: P50<5Β msP50 < 5\text{ ms}, P99<25Β msP99 < 25\text{ ms} for API routing.
  • Zero Single Point of Failure (SPOF): Fully distributed microservice mesh with (Hystrix / Resilience4j).

2. Capacity & Scale Estimation (Back-of-the-Envelope Math)

Traffic Scale

  • Global Paid Subscribers: 250,000,000250,000,000.
  • Peak Concurrent Video Streams: 15,000,000Β streams15,000,000\text{ streams}.
  • Average Stream Bitrate: 4.5Β Mbps4.5\text{ Mbps} (1080p1080\text{p} / 4K4\text{K} blend).
  • Peak CDN Video Egress Bandwidth: PeakΒ Bandwidth=15,000,000Γ—4.5Β Mbps=67,500,000Β Mbps=67.5Β Tbps\text{Peak Bandwidth} = 15,000,000 \times 4.5\text{ Mbps} = 67,500,000\text{ Mbps} = \mathbf{67.5\text{ Tbps}}

Control Plane API Throughput

  • API Requests per Active Session: β‰ˆ2Β QPS\approx 2\text{ QPS} (playback heartbeats, discovery telemetry, telemetry logs).
  • Peak API Gateway Volume: PeakΒ APIΒ QPS=15,000,000Γ—2=30,000,000Β QPSΒ (Global)β‰ˆ10,000,000Β QPSΒ perΒ Region\text{Peak API QPS} = 15,000,000 \times 2 = \mathbf{30,000,000\text{ QPS (Global)}} \approx \mathbf{10,000,000\text{ QPS per Region}}

Distributed Cache Memory Footprint (EVCache / Memcached)

  • Active User Session Context: 250MΒ usersΓ—4Β KBΒ state=1Β TBΒ RAM250\text{M users} \times 4\text{ KB state} = \mathbf{1\text{ TB RAM}}.
  • Personalized Recommendation Graph Cache: 50MΒ activeΒ profilesΓ—50Β KB=2.5Β TBΒ RAM50\text{M active profiles} \times 50\text{ KB} = \mathbf{2.5\text{ TB RAM}}.
  • Total In-Memory Cache Provisioning: β‰ˆ10Β TBΒ RAM\approx \mathbf{10\text{ TB RAM}} per region across multi-AZ EVCache clusters.

3. High-Level Architecture & Component Mapping

Interactive Architecture Diagram
Synthesizing vector architecture diagram...

Part 2: Production Deep-Dive Locked1 Coin = 24 Hours

Unlock Complete Architecture & Production Runbooks

Your Balance:40 Coins

You have explored the free architectural preview (~45%). Spend 1 Coin to unlock the remaining 8 production deep-dive sections for a full 24 hours.

Sections Included in This 24-Hour Pass:
4. API Interface Design & Wire Protocol
5. Data Model & Database Schema
6. Deep-Dive: Zuul 2 Async Proxy & Active-Active Multi-Region Traffic Evacuation
7. Caching & Storage Optimization (EVCache & Open Connect)
8. Reliability, Fault Tolerance & Chaos Engineering
9. Security, Authentication & DRM Protection
10. Comprehensive Trade-off Matrix
11. Real-World Engineering Failure Modes & Post-Mortem Lessons
Keeps page unlocked for exactly 24 hoursSpend coins to fund LLM & compute infrastructure