Netflix Content Delivery Architecture
How Netflix streams to 260M users without a single datacenter
Key Insight
Moving bytes close to users (edge servers in ISPs) is always cheaper and faster than building bigger datacenters.
Request Journey
How It Works
โ User presses play
โก Netflix DNS resolves nearest ISP PoP
โข OCA checks local cache
โฃ Cache miss fetches chunk from S3 origin
โค OCA caches chunk for future requests
โฅ DASH player adapts bitrate based on bandwidth
โ The Problem
Netflix needs to stream 4K videoto 260 million subscribers across 190 countries simultaneously. A centralized datacenter would mean every byte travels thousands of miles, causing buffering and astronomical egress costs. At peak, Netflix represents 15% of all global internet traffic โ impossible to serve from one place.
โThe Solution
Netflix built Open Connect โ a purpose-built CDN with 17,000+ appliances physically inside ISP networks. ISPs get free hardware; Netflix eliminates egress fees. 95% of all traffic is served from ISP-embedded caches without touching the internet backbone.
๐Scale at a Glance
700 Tbps+
Peak Streaming
17,000+
OCA Servers
1,000+
ISP Partners
~95%
Cache Hit Rate
๐ฌDeep Dive
Open Connect Appliances โ Netflix's Own CDN Hardware
Unlike companies relying on Akamai or Cloudfront, Netflix designs and deploys its own CDN hardware called Open Connect Appliances (OCAs). These are high-density servers with up to 1 petabyte of storage, placed physically inside ISP datacenters worldwide. Netflix offers them to ISPs for free โ ISPs save on peering costs because Netflix traffic stays local, and Netflix pays zero egress fees to transit providers. The OCA runs a custom FreeBSD-based OS optimized for high-throughput file serving.
Proactive Cache Filling โ Predicting What You'll Watch Tonight
Every night during off-peak hours (2โ4am local time), Netflix's cache-filling system pushes the next day's most-likely-watched content to nearby OCAs. The algorithm uses regional viewing patterns, day-of-week trends, new release schedules, and content popularity decay curves. Popular content is cached on thousands of OCAs globally; niche content lives on fewer. This pre-positioning means when you press play, the first byte arrives in under 50ms from a server potentially a few miles away.
Consistent Hashing for Load Distribution
Netflix's steering service uses consistent hashing to pick which OCA serves your request. A virtual ring maps 'content ID + client IP prefix' tuples to server clusters. The same video chunk always maps to the same OCA cluster, maximizing cache hit rates. When an OCA fails, consistent hashing minimizes remapping: only 1/N of keys move โ compared to 100% remapping in a simple modulo approach.
Adaptive Bitrate Streaming โ Smooth Playback Despite Network Variance
Netflix encodes every title at 20+ quality levels โ 235 Kbps mobile to 16 Mbps 4K HDR. The client player monitors bandwidth every 10 seconds and switches quality mid-stream. If your connection drops, you get a lower-quality segment within 2 chunks (~4 seconds) rather than buffering. The AV1 codec achieves 30% better compression than H.264 at the same quality, reducing bandwidth costs significantly.
Chaos Engineering โ Building Confidence Through Deliberate Failure
Netflix invented Chaos Engineering with Chaos Monkey โ a tool that randomly terminates production instances during business hours. The broader Simian Army includes Chaos Gorilla (terminates entire AWS AZs) and Latency Monkey (introduces artificial delays). This culture means Netflix engineers routinely prove their services handle failure โ so when AWS has a real region outage, Netflix users see zero downtime.
โฌกArchitecture Diagram
Netflix Content Delivery Architecture โ simplified architecture overview
โฆCore Concepts
CDN
Consistent Hashing
Adaptive Bitrate Streaming
Chaos Engineering
Edge Caching
Zuul API Gateway
โTradeoffs & Design Decisions
Every architectural decision is a tradeoff. Here's what you gain and what you give up.
โ Strengths
- โ95%+ cache hit rate eliminates origin server load
- โISP partnerships eliminate transit/egress costs entirely
- โSub-50ms video start times globally due to physical proximity
- โIndependent CDN means no reliance on third-party vendors during outages
โ Weaknesses
- โMassive operational complexity managing 17,000+ servers across 1,000 ISP partners
- โHigh upfront capital expense for OCA hardware in every market
- โCache-filling consumes ISP network bandwidth during off-peak hours
- โNiche content has low cache hit rates โ must fall back to origin
๐ฏFAANG Interview Questions
Interview Prep๐ก These questions appear in FAANG system design rounds. Focus on tradeoffs, not just what the system does.
These are real system design interview questions asked at Google, Meta, Amazon, Apple, Netflix, and Microsoft. Study the architecture above before attempting.
- Q1
Design Netflix's CDN from scratch. Where would you start and what's the first component you'd build?
- Q2
A new blockbuster drops and demand is 50ร predicted peak. How does Netflix handle this?
- Q3
Explain consistent hashing. If Netflix adds a new OCA server, what percentage of cached content needs to move?
- Q4
A user in rural Brazil experiences constant buffering on a 4K title. Walk through every system that could be the bottleneck.
- Q5
How would you design the proactive cache-filling algorithm? What data signals would you use to predict what to pre-load?
Research Papers & Further Reading
Netflix's Globally Distributed CDN
Netflix Tech Blog
Listen to the Podcast Episode
Alex & Sam break it down
Listen to a conversational deep-dive on this architecture โ real trade-offs, production context, and student-friendly explanations. Free, no login required.
Listen to EpisodeFree ยท No account required ยท Listen in browser
More Distributed Systems
View allTwitter Fan-Out & Timeline Architecture
The push vs pull dilemma at 500M tweets/day
X (Twitter) ยท Instagram ยท LinkedIn
Uber Surge Pricing & Geospatial Architecture
H3 hexagonal indexing, real-time dispatch, and dynamic pricing
Uber ยท Lyft ยท DoorDash
WhatsApp Messaging at 100B Messages/Day
How 50 engineers built a system bigger than Twitter
WhatsApp ยท Telegram ยท Signal
Listen to more architecture deep-dives
30 free podcast episodes โ Alex & Sam break down every architecture in this library. Listen in your browser, no account needed.
All architecture articles are free ยท No account needed