HomeArchitecturesNetflix Content Delivery Architecture
โšก Distributed SystemsAdvancedWeek 1

Netflix Content Delivery Architecture

How Netflix streams to 260M users without a single datacenter

NetflixDisney+Hulu

Key Insight

Moving bytes close to users (edge servers in ISPs) is always cheaper and faster than building bigger datacenters.

Request Journey

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
+1 more steps

How It Works

1

โ‘  User presses play

2

โ‘ก Netflix DNS resolves nearest ISP PoP

3

โ‘ข OCA checks local cache

4

โ‘ฃ Cache miss fetches chunk from S3 origin

5

โ‘ค OCA caches chunk for future requests

6

โ‘ฅ 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

1

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.

2

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.

3

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.

4

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.

5

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.

  1. Q1

    Design Netflix's CDN from scratch. Where would you start and what's the first component you'd build?

  2. Q2

    A new blockbuster drops and demand is 50ร— predicted peak. How does Netflix handle this?

  3. Q3

    Explain consistent hashing. If Netflix adds a new OCA server, what percentage of cached content needs to move?

  4. Q4

    A user in rural Brazil experiences constant buffering on a 4K title. Walk through every system that could be the bottleneck.

  5. 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

2016

Netflix's Globally Distributed CDN

Netflix Tech Blog

Read

Listen to the Podcast Episode

๐ŸŽ™๏ธ Free Podcast

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 Episode

Free ยท No account required ยท Listen in browser

More Distributed Systems

View all
๐ŸŽ™๏ธ Podcast ยท All Free

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