Skip to content
SeeItFlow
System Design · 12 chapters · ~22 min read

Designing Netflix

Streaming video at Netflix's scale means every architectural choice has to assume a region will go down: a single origin can't serve global traffic, and adaptive bitrate has to keep working when a CDN edge or an entire data center drops offline. This walkthrough goes from a single server to a geo-distributed architecture built around that assumption.

Mangesh MandlikLast updated:
Chapter 01

Problem Definition

We are designing a platform where users browse a content catalog, search for titles, and stream video — smoothly, on any device, on any network, anywhere in the world.

The experience looks simple: open the app, pick a movie, press play. Underneath that simplicity is one of the most bandwidth-intensive workloads in modern infrastructure — delivering gigabits per second of continuous video to very large numbers of concurrent viewers (an illustrative design target, not a published figure), across every continent, on networks that vary from gigabit fiber to weak mobile signal.

The core split: control vs data

The single most important observation about a video streaming platform is that it has two fundamentally different workloads. The control plane handles browsing, search, authentication, recommendations, and playback metadata — relatively small requests, latency-sensitive, but manageable volume. The data plane handles the actual video bytes — enormous, continuous, bandwidth-dominated. Treating these the same way is the most common architectural mistake in this problem space.

Interactive

Visual Design Journey

Watch a single video server evolve, bottleneck by bottleneck, into a global streaming architecture — control/data-plane separation, transcoding, CDN caching, and adaptive bitrate streaming, all earned step by step.

Chapter 02

Requirements

Functional requirements define what the system does. Non-functional requirements define how it must behave at scale and under failure — and for a streaming platform, the second list drives the entire architecture.

Functional

Browse content catalog. Search by title, genre, person. Start, pause, resume, and seek video. Stream across devices (TV, phone, browser). Maintain per-user watch state. Personalized recommendations and content discovery.

Non-functional

Low startup latency

Pressing play should produce the first frame in under a second. This requirement drives CDN placement, segment size, and manifest caching.

High availability

Playback must survive individual server failures and even regional outages — no single point of failure in the delivery path.

Adaptive quality

The player must handle network variability gracefully — reducing quality to avoid buffering, recovering when conditions improve.

Global scale

An illustrative design target: very large numbers of simultaneous users across every continent, with low latency (typically tens of milliseconds or less) to the nearest edge.

Chapter 03

Start Simple

Start with the simplest thing that could work: one streaming API, one storage system, one region.

Swipe to pan
Simple Delivery — Works at small scaleViewerany deviceStreaming APImonolithVideo Storageraw filesrequestfetchAll users hit the same server — breaks at scale
The simplest possible delivery: one API, one storage, everything routes through a single server

At small scale this is fine. The API accepts playback requests, fetches video from storage, streams it to the viewer. No CDN, no adaptive bitrate, no encoding pipeline. A few hundred users can be served this way.

Where this breaks

Video streaming is bandwidth-dominated. Unlike a typical API request that returns kilobytes, a 1080p video stream requires 8+ Mbps continuously per viewer. A single server exhausts its network capacity very quickly. Worse, users in other countries experience high latency because every byte travels from one data center, potentially across oceans.

Swipe to pan
Origin Overload — Without CDN, all traffic hits one placeUS ViewerEU ViewerAPAC ViewerOriginSATURATEDload 98%single pointof failure✗ High latency✗ Buffering✗ Global single PoF✗ Bandwidth cost
Without a CDN, all global traffic converges on one origin — high latency, buffering, and a single point of failure
Chapter 04

Control Plane & Data Plane

The first major architectural decision: the control plane and data plane must be separate infrastructure.

Swipe to pan
Control Plane vs Data PlaneViewerControl PlaneAPIauth · catalog · recsData PlaneOriginobject storageCDN Edgeclose to userbrowse · authvideo bytes (CDN URL from control plane)Control: small, fast, latency-sensitiveData: enormous bandwidth, CDN-distributed
Control plane handles small, fast requests; the data plane carries video bytes — they must not compete for the same resources

The control plane serves browsing, search, auth, recommendations, and playback manifest URLs. These are small, fast requests — a few kilobytes each. The data plane serves video bytes — gigabits per second, continuously. Mixing them on the same servers means a video stream spike can starve catalog browsing, and a recommendation computation can delay playback. (Personalization is a substantial system on its own — see the full Recommendation System deep dive.)

Control plane: a horizontally-scaled API cluster backed by a catalog database, recommendation service, and user-state store. Each service scales independently based on its own load patterns.

Data plane: object storage (the origin) served through CDN. The control plane never touches video bytes after returning a signed manifest URL to the player.

Chapter 05

Video Processing

A raw uploaded video cannot be streamed directly. It must be transcoded into multiple representations, then segmented for adaptive delivery.

Swipe to pan
Encoding Pipeline — One upload, many renditionsUploadraw masterQueueasync jobsEncoder4K/1080pEncoder720p/480pOriginall segmentsAsync · Parallel · Segments stored with manifest → CDN-ready
An async encoding queue fans uploads out to parallel workers — each producing renditions that land in object storage

A single master video file is encoded into multiple resolution/bitrate combinations. Example ladder (illustrative, not Netflix's actual encodes): 4K at 15+ Mbps, 1080p at 8 Mbps, 720p at 5 Mbps, 480p at 2 Mbps, 360p at 0.5 Mbps. Each rendition is then split into 2-4 second segments. A manifest file lists every rendition, every segment URL, and each segment's duration. In practice, the exact rendition ladder is tuned per title rather than fixed — see Per-Title Encoding for how.

Swipe to pan
Transcoding Ladder — One upload, many representationsUploadraw master4K · 15 Mbps1080p · 8 Mbps720p · 5 Mbps480p · 2 Mbps360p · 0.5 MbpsOriginall renditions+ segmentsEach rendition segmented into 2-4s chunks · Player picks best quality for current network
The transcoding ladder — one upload becomes five or more representations, each stored in object storage

Why async encoding

Transcoding is CPU-intensive and can take minutes to hours per title. It runs asynchronously after the upload completes. A queue receives the upload notification and fans it out to encoding workers — one per target rendition, running in parallel. When encoding completes, all renditions and segments are written to object storage.

Swipe to pan
Segments + Manifest — How HLS/DASH delivery worksManifest1080p → /seg_*.ts720p → /seg_*.ts480p → /seg_*.tsduration: 4s eachPlayer fetches this first1080p rendition — segmented into 4-second chunksseg_10:00seg_20:04seg_30:08seg_40:12seg_50:16seg_60:20seg_70:24↑ currently downloadingEach segment independently cacheable by CDN · Player switches quality row at any boundary
Each rendition is split into independently cacheable 2-4 second segments; the manifest is the table of contents the player fetches first
Key takeaways
  1. 01One upload produces 4-6+ renditions, each split into hundreds of segments
  2. 02Encoding is async — titles are not available immediately after upload
  3. 03Object storage is the authoritative source for all encoded content
  4. 04The manifest is a small text file that lets the player discover all segments
Chapter 06

CDN Delivery

The CDN is not an optimization — it is the primary delivery mechanism. Without it, global streaming at this scale is physically impossible.

Swipe to pan
CDN Delivery — Content moves to the edge, close to usersOriginobject storage(authoritative)US Edge~5ms to US userEU Edge~8ms to EU userAPAC Edge~6ms to APAC userUS UserEU UserAPAC Usercache fill(on miss only)instant hitinstant hitinstant hit✓ Physics: nearby edge = single-digit ms · Far origin = 100–300ms per request
CDN edges co-located with users worldwide — cache fill from origin happens once per segment per edge, then every viewer gets a fast local hit

A CDN has edge nodes in hundreds of cities worldwide. Video segments are cached at these edges. A viewer in Tokyo fetches segments from a CDN node in Tokyo — single-digit millisecond latency. Without CDN, the same viewer fetches from a US data center — roughly 150ms round-trip, on every 2-4 second segment request.

Cache miss and cache hit

Swipe to pan
CDN Cache Miss → Cache HitFirst request — MISSViewerCDN Edgecache MISSOrigin← segment cached at edgeSubsequent requests — HIT (origin not involved)Viewer 2Viewer NCDN Edgecache HIT ✓← instant · < 10ms · no origin request
First request triggers a cache miss — edge fetches from origin and caches. Every subsequent request is a cache hit served instantly from the edge

On the first request for a segment at a given edge, the edge fetches it from origin storage and caches it. Every subsequent request for that segment at that edge is a cache hit — served instantly from local storage, no origin involved. For popular content, the cache hit rate approaches 99%+. The origin serves only the initial cache-fill traffic.

At Netflix's actual scale, the CDN described above is largely Netflix's own purpose-built network, Open Connect, rather than a third-party CDN — see the Open Connect deep dive for why that distinction matters.

Chapter 07

Adaptive Bitrate Streaming

Adaptive Bitrate (ABR) streaming lets the player continuously match quality to available bandwidth, trading resolution for continuity.

Swipe to pan
Adaptive Bitrate Streaming — Quality follows the network1080p720p480p1080pStrong WiFiMediumWeak 3GWiFi recoveredAt each 2-4 second segment boundary, the player measures download speed and selects thehighest quality rendition it can download faster than it plays. No buffering — quality adapts.Trade-off: Accept visible quality reduction to prevent playback interruption. Always the right call.
At every segment boundary the player re-evaluates network capacity — quality tracks signal strength automatically, no buffering

At every segment boundary, the player measures how quickly the last segment downloaded versus how quickly it is being consumed. If the download rate exceeds playback rate, it can request a higher quality rendition. If download rate falls behind, it switches to a lower quality rendition to avoid buffering.

The trade-off

ABR accepts visible quality reduction to avoid playback interruption. A buffering spinner is always worse than a quality drop. The system is tuned to keep the buffer ahead by several seconds — enough to absorb brief network fluctuations without user-visible impact.

HLS / DASH

HTTP Live Streaming (HLS) and DASH are the two standard segmented streaming protocols. Both use text manifests to describe renditions and segment URLs. The player fetches segments over regular HTTPS — no special streaming protocol needed, so CDN works seamlessly.

Chapter 08

Global Scale & Distribution

Global delivery is a direct consequence of physics: signal propagation in fiber alone adds roughly 30 ms one way across the Atlantic (about 70–90 ms round trip once routing is included). CDN edges eliminate that delay for video bytes.

Swipe to pan
Final Architecture — Global delivery at scaleUS ViewerEU ViewerAPAC ViewerControl Planeauth · catalog · APICDN 🇺🇸North AmericaCDN 🇪🇺Europe🌐 CDN 🌏Asia-PacificOriginobject storagecache miss only✓ Video bytes never cross oceans — served from nearby CDN edge · Origin sees ~1% of requests (illustrative)
The globally distributed architecture — control plane, encoding pipeline, origin storage, and CDN edges working in concert

Each geographic region has CDN edge nodes close to users. DNS-based routing or anycast directs each user's requests to their nearest edge. In the target state the control plane is also multi-region — authentication and catalog queries are served from regional API clusters, not a single global data center. A first version can start with one primary control-plane region plus a warm standby and regionalize later (see Core Trade-offs).

Video bytes almost never cross ocean cables after initial CDN seeding. Content is cached at regional edges after first request and served locally to all subsequent viewers in that region.

Key takeaways
  1. 01Users connect to their nearest CDN edge — typically a few tens of milliseconds or less (illustrative)
  2. 02Origin traffic is minimal — mostly cache fills for new or rare content
  3. 03In the target state the control plane is multi-region for low latency on auth and catalog queries
  4. 04In the target state, no component is a global single point of failure
Chapter 10

Failure Scenarios

At global scale, failures are not exceptional — they are routine. The architecture must handle them without user-visible impact.

CDN edge failure

A single CDN node goes down. DNS health checks detect it within seconds, traffic reroutes to the next nearest edge, and streams continue at slightly higher latency with no data loss.

Regional failure

Swipe to pan
Regional Failure — Traffic automatically reroutesUS UserEU UserUS CDN⛔ DOWNEU CDNabsorbing ↑Originmulti-regionControl Planererouting DNSblockedreroutedUS users rerouted to EU edge · Higher latency, but streams continue · No data loss
When a regional CDN goes down, the control plane reroutes DNS — users experience higher latency but streams typically continue, with at most a brief rebuffer

An entire region becomes unavailable. The multi-region control plane reroutes affected users to alternate regions, and CDN edges and origin storage elsewhere absorb the redirected load.

Network degradation

Widespread congestion reduces available bandwidth for many users at once. Adaptive streaming reduces quality across the board rather than buffering, and recovers automatically as congestion clears.

These are just the headline scenarios — see the full Failure & Scale Scenarios page for deeper walkthroughs of each, plus additional scenarios not covered here.

Chapter 11

Core Trade-offs

Every architectural decision in a streaming platform involves a trade-off. Being explicit about them is the mark of a strong design.

Four trade-offs recur throughout this design: origin vs CDN (origin stays authoritative, CDN handles delivery at scale), quality vs bandwidth (adaptive streaming finds the best fit for current network conditions), pre-encoding vs on-demand transcoding (pre-encoding wins at streaming scale despite the storage cost), and centralized vs multi-region control plane (centralized is simpler; multi-region is required for global availability).

Each of these is examined in full, including two additional trade-offs around recommendations and watch-state consistency, on the Trade-offs & Decisions page.

Chapter 12

Final Mental Model

The architecture emerges directly from the requirements. Every component is justified by a real bottleneck.

Swipe to pan
Final Architecture — Global delivery at scaleUS ViewerEU ViewerAPAC ViewerControl Planeauth · catalog · APICDN 🇺🇸North AmericaCDN 🇪🇺Europe🌐 CDN 🌏Asia-PacificOriginobject storagecache miss only✓ Video bytes never cross oceans — served from nearby CDN edge · Origin sees ~1% of requests (illustrative)
The complete Netflix-style architecture — encoding pipeline, origin storage, multi-region CDN, adaptive streaming, and independent control plane

Upload path: Studio upload → encoding queue → parallel transcoding workers → multiple renditions + segments → object storage.

Playback path: User opens app → control plane (auth + catalog + manifest URL) → player fetches manifest from CDN → player fetches segments from CDN edge → CDN fills from origin on cache miss → adaptive bitrate switches quality as network changes.