Skip to content

Case Study: Netflix ​

"OCAs have the sole responsibility of storing playable bits to make content available to client devices as efficiently as possible." — Netflix, Open Connect Overview (openconnect.netflix.com)

Summary: Netflix splits itself in two: a control plane that runs in AWS (sign-in, browsing, recommendations, playback decisions, steering, encoding, data) and a data plane called Open Connect, a fleet of Netflix-built cache appliances (OCAs) placed inside ISPs and at internet exchanges that does almost nothing except serve video bytes. Around that split sit an encoding pipeline that optimises every title (per-title, then per-shot), a Zuul edge gateway and a federated GraphQL API, a resilience toolkit (Hystrix, then adaptive concurrency limits, Chaos Monkey, ChAP, active-active regions and Nimble evacuation), and a data platform (Cassandra, EVCache, Keystone on Kafka and Flink, Iceberg). Focus: Every architecture claim on this page comes from a Netflix engineering post, Netflix document or Netflix open-source README that was fetched, read and saved; each one is named with its date. Anything generalised or guessed is marked inference. The page follows the 4-step method (scope, estimate, high-level design, decisions) and gives one concept block per subsystem, a dated timeline, and a "what you can copy" map to the generic chapters. Learning goal: Explain, with sources, why Netflix moved video bytes out of the cloud and into ISPs, how a title becomes playable files and gets onto caches before anyone presses Play, how a request flows through Zuul and the API, what protects services under overload and during a region outage, and which of these ideas a normal team should copy (and with which generic technique), then implement two of the mechanisms (cache steering, adaptive concurrency limits) and a per-title ladder in Go and Laravel.

This chapter belongs to the Case Studies group of system design. It does not re-teach the generic mechanisms; it shows where Netflix used them and links the chapter that owns each one: CDNs for caching tiers and video packaging, Chaos Engineering for experiments, Circuit Breaker and Load Shedding for overload, Cascading Failures, Caching, GraphQL, API Gateway, BFF & Service Mesh, Service Discovery, Containers & Kubernetes, Observability, ML Systems, Cassandra & ScyllaDB, Kafka and Stream Processing. The method itself is in The 4-Step Approach; a sibling video case study is YouTube & Video Streaming. Persian version: /fa/system-design/case-study-netflix.

How to read the claims. A sentence that names a Netflix post (for example Source: Netflix and Fill, 2016) states what that post says. A sentence marked inference is this page's own reasoning: plausible, useful, and not something Netflix published. Netflix's posts describe the system at the moment they were written; several of them describe things Netflix later replaced, and the timeline says so.

Page map ​

If you are looking forGo to
The whole system in four tablesEverything in one minute
Why the system looks like thisWhy it exists
Dated history from Netflix's postsWhere it comes from
Step 1 and 2 of the method: scope and numbersScope, Estimate
Step 3: the high-level pictureHigh-level design
AWS control plane vs Open ConnectControl plane and data plane
OCAs, ISPs, exchanges, peeringOpen Connect appliances
Getting files onto caches overnightProactive fill and fill windows
From Play to the first byte, DRMPlayback, steering and DRM
Split, parallel, checked encodingChunked encoding pipeline
Per-title, per-shot, VMAFPer-title and per-shot encoding
AVC, HEVC, VP9, AV1, ABR, manifestsCodecs and adaptive streaming
The edge gatewayZuul
REST, BFF, GraphQL federation, DGSAPI evolution
Fault tolerance libraries then and nowHystrix and its retirement, Adaptive concurrency limits
Breaking things on purposeChaos Monkey, FIT and ChAP
Surviving a regionActive-active and Nimble
Storage and cachesCassandra, EVCache
Events and the data lakeKeystone, Kafka, Flink and Iceberg
Discovery, client load balancing, SpringEureka, Ribbon, Spring Cloud Netflix
Containers and deploymentTitus, Spinnaker and Kayenta
Recommendations and experimentsPersonalisation and A/B testing
Metrics, streams, tracesAtlas, Mantis and tracing
Exact numbers and knobsMechanics
CodeGo, Laravel
Classic problems and Netflix's answerSolving the classic problems
What a normal team should copyWhat you can copy, Choosing
Monolith to distributed systemIn architecture
A labLab
Wrong beliefs, summary, quiz, termsMisconceptions, Cheat sheet, Self-check, Glossary

Everything in one minute ​

The system in one table. Each row is unpacked in the catalogue.

SubsystemWhat Netflix doesNetflix source (date)Generic chapter
Control planeEverything except video bytes runs in AWSCompleting the Netflix Cloud Migration (2016)Scaling strategies
Data planeOpen Connect: own CDN of OCAs inside ISPs and at IXPsOpen Connect OverviewCDN
FillFiles pushed to caches in off-peak fill windows, tiered from S3Netflix and Fill (2016)CDN: push vs pull
SteeringAWS service returns ranked OCA URLs per fileOpen Connect OverviewLoad balancing
EncodingChunked, parallel, checked; per-title then per-shotHigh Quality Video Encoding at Scale (2015), Per-Title (2015), Dynamic Optimizer (2018)Object storage
EdgeZuul gateway, async on Netty (Zuul 2)Zuul 2 posts (2016, 2018)API gateway
APIDevice-specific API (2012), GraphQL federation with DGS (2020)API redesign (2012), GraphQL Federation (2020)GraphQL
OverloadHystrix (2012), then adaptive concurrency limits (2018)Hystrix README, Performance Under Load (2018)Load shedding
ChaosChaos Monkey (2011), ChAP (2017)Simian Army (2011), ChAP (2017)Chaos engineering
RegionsActive-active (2013), Nimble 8-minute evacuation (2018)Active-Active (2013), Project Nimble (2018)Capacity planning & DR
DataCassandra, EVCache (memcached), Keystone (Kafka, Flink), IcebergPosts 2011, 2013, 2016, 2018; Iceberg READMECassandra, Kafka
PlatformEureka, Ribbon, Spring Boot, Titus, Spinnaker, KayentaREADMEs; posts 2015-2018Service discovery
ProductRecommendations, A/B testing for every changeRecommendations (2012), Experimentation Platform (2016)ML systems
ObservabilityAtlas metrics, Mantis streams, Zipkin-based tracingAtlas (2014), Mantis (2019), Tracing (2020)Observability

Numbers Netflix published. Each number belongs to the date of its post; none of them is "now".

NumberContextSource (date)
1.1 million client writes/s (3.3 million with replication)Cassandra benchmark, 288 instances, 3 zonesBenchmarking Cassandra (2011)
99.99%Internal availability goalActive-Active (2013)
500 msCross-region read of 1 million just-written records succeededActive-Active (2013)
50 min to 8 minRegion evacuation before and after NimbleProject Nimble (2018)
80+ Zuul 2 clusters, 1 million+ requests/sCloud gatewayOpen Sourcing Zuul 2 (2018)
3 million containers per weekTitus in April 2018Titus open source (2018)
20 to 9003-minute chunks vs 4-second shots per 1-hour episodeOptimized shot-based encodes (2018)
20%AV1 compression gain over Netflix VP9 encodesAV1 on Android (2020)
1.2 billion+ time seriesAtlas during a failover exerciseIntroducing Atlas (2014)
15 minutesInspect a 4K source with chunked inspectionHigh Quality Video Encoding at Scale (2015)

Why each big choice was made (one line each).

ChoiceInstead ofReason given by Netflix
Own CDN inside ISPsCommercial demand-driven CDNWork directly with ISPs; proactive caching "much more efficient" (Open Connect Overview)
Cloud for the control planeOwn data centres2008 database corruption; "could not have racked the servers fast enough" (Cloud Migration, 2016)
Per-title laddersOne fixed ladderTitles differ hugely in complexity (Per-Title, 2015)
GraphQL federationMonolithic API aggregation layerAggregation layer became the bottleneck for many teams (Federation, 2020)
Adaptive limitsFixed limits from load testsFixed limits go stale (Performance Under Load, 2018)
Dark capacityScaling up at failover timeStart-up took 25 minutes (Nimble, 2018)

The 4-step backbone of the catalogue.

StepQuestionWhere on this page
1 ScopeWhat must the system do, for whom, how well?Scope
2 EstimateHow big is it? (back-of-envelope, labelled)Estimate
3 High-level designWhich boxes and arrows?High-level design
4 DecisionsWhy each box looks the way it doesOne block per subsystem below

Why it exists ​

Streaming video is two systems glued together. One is a normal internet product: accounts, catalogue, search, recommendations, billing, playback authorisation. Its requests are small and numerous, and it changes every day. The other is a bulk delivery system that pushes very large files at a sustained rate to millions of screens at the same evening hour. The two have opposite needs: the first wants elasticity and fast deploys, the second wants bandwidth close to the viewer and predictability. Netflix's answer is to run the first in AWS and to build the second itself (Source: Open Connect Overview; Completing the Netflix Cloud Migration, 2016).

AxisControl plane (AWS)Data plane (Open Connect)
Request sizeSmall JSON/GraphQL callsLarge video byte ranges
Change rateHundreds of deploys a day (ChAP, 2017)Appliance software and content updates in fill windows
ScalingAutoscaling groups, containersHardware placed per ISP site, capacity planned
StateCassandra, EVCache, S3, KafkaOnly files on disk; no member data (Open Connect Overview)
Failure responseRetry another instance, evacuate a regionClient switches to another OCA URL (inference from the multiple-URL design)

Everyday analogy. Think of a library service. The head office (AWS) keeps the catalogue, the member cards and the reading statistics, and decides which branch you should collect a book from. The branches (OCAs) only hold books. Because the head office knows what people will read tomorrow, it ships boxes of books to the branches at night, when the roads are empty. In the evening you walk to your nearest branch; the head office was only asked "where?". The analogy returns throughout the page.

Three common misunderstandings, up front ​

  1. "Netflix streams from AWS." The application runs in AWS; video is delivered by Open Connect (Source: Completing the Netflix Cloud Migration, 2016: "Video is delivered through Netflix Open Connect").
  2. "Netflix's stack is Hystrix, Ribbon and Eureka." That was the 2012 open-source stack. Hystrix is in maintenance mode, Ribbon is in maintenance, and Netflix moved to Spring Boot in 2018 (Source: Hystrix README; Ribbon README; Netflix OSS and Spring Boot, 2018).
  3. "Copying Netflix means microservices plus chaos." Netflix's own posts tie each tool to a specific failure it had at its scale; a team without that failure gets the cost without the benefit (inference).

Where it comes from ​

The cloud move started with an outage: in August 2008 a major database corruption stopped DVD shipping for three days; the migration finished in early January 2016, after seven years, by rebuilding "virtually all of our technology" as cloud-native services rather than lifting and shifting (Source: Completing the Netflix Cloud Migration, 2016). Open Connect began in 2011 (Source: Open Connect Overview).

What changed over time (dates from Netflix's own posts)2008DB corruption,move to AWS2011Chaos Monkey,Open Connect, Cassandra2012Hystrix,API redesign2013active-active,EVCache, Zuul OSS2015per-title encoding,Spinnaker, Keystone live2016cloud migration done,Zuul 2 on Netty2017ChAP2018Nimble, concurrency limits,shot-based encodes, Titus,Kayenta, Zuul 2 OSS,Keystone Flink, Spring Boot2019-2020Mantis OSS, AV1 Android,GraphQL federation, tracing2021DGS OSS, Cosmos,AV1 on TVsPattern: build in-house when nothing exists, open-source it, then move to the community option once it matures(Hystrix to adaptive limits and Resilience4j, Ribbon to gRPC, internal Java stack to Spring Boot)
Date (post)What changedLater status
2008-08Database corruption, decision to move to AWSMigration completed January 2016
2011-07Chaos Monkey and the Simian Army announcedChaos Monkey now integrated with Spinnaker (README)
2011-11Cassandra benchmark, 1.1 million writes/sCassandra used for user data in active-active (2013)
2011Open Connect initiative beginsThousands of OCAs (Overview)
2012-07API redesign: device-specific endpoints instead of one REST APIGraphQL federation for studio (2020)
2012-11Hystrix open-sourcedMaintenance mode, final 1.5.18
2013-02Active-active across US-East-1 and US-West-2; EVCache open-sourcedNimble evacuation (2018)
2014-12Atlas open-sourcedStill the metrics backend
2015-11Spinnaker open-sourced, replaces AsgardKayenta added 2018
2015-12Chunked parallel encoding; per-title encoding; Keystone livePer-shot (Dynamic Optimizer) 2018
2016-09Zuul 2 on Netty in productionOpen-sourced 2018
2017-07ChAP
2018Nimble; adaptive concurrency limits; Titus and Kayenta open-sourced; Keystone on Flink; Spring Boot adoption
2019-10Mantis open-sourcedUsed for tracing pipeline (2020)
2020AV1 on Android; GraphQL federation; Zipkin-based tracingAV1 on TVs (2021)
2021DGS framework open-sourced; Cosmos media platform

The concept catalogue ​

The catalogue follows the 4-step method. Steps 1 and 2 are this page's own framing (inference); Netflix does not publish a requirements document. Step 3 is drawn from Netflix's Open Connect Overview. Step 4 is one block per subsystem, each sourced.

Step 1: scope Must-know ​

In plain words: before drawing boxes, write down what the system must do and how well; for Netflix that splits naturally into "pick something" and "watch it".

Common misunderstanding: "The scope is video streaming." Streaming is one requirement; browse, personalise, authorise, encode, measure and experiment are the others, and they drive most of the services.

Definition: functional requirements (what) plus non-functional requirements (how well, how much), each with a number or a quality bar.

Functional (inference, from the subsystems Netflix describes)
1  member signs in, picks a profile, browses personalised rows
2  member presses Play: authorise, check licence, choose files, return URLs
3  device streams video with adaptive bitrate, switches servers on trouble
4  studio delivers a master; pipeline encodes and places it before release
5  every product change runs as an A/B test before it becomes the default
Non-functional
6  availability goal 99.99% (Netflix, Active-Active 2013)
7  survive loss of an instance, a zone and a region (Simian Army 2011, Nimble 2018)
8  video bytes travel the shortest network distance (Open Connect Overview)

Real scenario: a new series launches worldwide at one moment; the scope says the files must already be in place in every country, which makes fill a first-class requirement rather than an optimisation (Source: Netflix and Fill, 2016).

RequirementDrives which subsystem
Browse and personaliseAPI, recommendations, EVCache, Cassandra
PlayPlayback services, steering, Open Connect
Quality on poor networksPer-title/per-shot encoding, AV1, ABR
Survive failuresHystrix, concurrency limits, chaos, active-active
Ship fast safelySpinnaker, Kayenta, Titus
Decide with dataKeystone, Iceberg, A/B platform, Atlas

Step 2: estimate Must-know ​

In plain words: a rough count of traffic, storage and bandwidth tells you which parts are hard; for Netflix, bandwidth dwarfs everything else.

Common misunderstanding: "Estimates need Netflix's real numbers." The point is the order of magnitude and which resource dominates; the arithmetic below is a labelled back-of-envelope (inference), using only one published input (an encode ladder top of about 5.8 Mbps for 1080p in the 2015 fixed ladder, Source: Per-Title Encode Optimization, 2015).

Definition: traffic = users x actions; bandwidth = concurrent streams x bitrate; storage = titles x renditions x duration x bitrate. Method in Capacity Estimation.

Back-of-envelope (inference; round, illustrative numbers)
1  assume 10 million concurrent streams at evening peak in one large region
2  average bitrate 3 Mbps (mix of phone, HD, 4K)
3  egress = 10e6 x 3e6 bit/s = 3e13 bit/s = 30 Tbit/s
4  control-plane calls: say 1 playback call + 20 browse calls per session start;
   1e6 session starts per hour = ~6,000 calls/s: large, but ordinary
5  storage per title: 20 renditions x 2 h x 3 Mbps avg = 20 x 2.7 GB = 54 GB per codec
6  conclusion: the hard resource is egress near users, not compute

Real scenario: 30 Tbit/s over transit links at peak would cost the ISP and Netflix far more than a box inside the ISP filled at night; this is the economic argument the Overview gives in words ("reducing the overall demand on upstream network capacity by several orders of magnitude").

ResourceOrder of magnitude (inference)Where it is solved
Egress bandwidthTens of Tbit/s per region at peakOpen Connect inside ISPs
Control-plane RPSThousands to millions/s across servicesAWS autoscaling, Zuul, EVCache
Encoding computeBursty, huge per new titleChunked encoding on spare capacity
Event volume"trillions of events" per day (Keystone, 2018)Kafka + Flink

Step 3: high-level design Must-know ​

In plain words: small decisions in the cloud, big bytes from caches near you.

Common misunderstanding: "The CDN is in front of the API." It is beside it: the client talks to AWS for decisions and to OCAs for bytes, and the AWS side hands out the OCA URLs.

Definition: the five-step playback flow published in the Open Connect Overview, drawn below.

Control plane in AWS decides; Open Connect appliances (OCAs) only serve bytesAWS regions (control plane)Zuul edge + API(login, browse)Playback servicesauthz, licence, filesSteering + cachecontrol servicesCassandra, EVCache, Kafka/Keystone, S3 (encoded files)Open Connect (data plane)OCAs at internet exchanges (peering)OCAs embedded inside the ISP1 report health, BGP routes, filesClient deviceTV, phone, browser2 play title X3-5 ranked OCA URLs6 video bytes (HTTP/HTTPS ranges)Small JSON calls go to AWS; the heavy bytes never leave the ISP or exchange when the OCA has the file
Playback (Source: Open Connect Overview, steps 1-5; step 6 named here)
1  OCAs report health, learned routes and stored files to cache control in AWS
2  client asks the Netflix application in AWS to play a title
3  playback services check authorisation and licensing, pick the files
   for this device and network
4  steering uses cache-control data to pick OCAs, generates URLs
5  playback services return the URLs to the client
6  client fetches video from the OCA

Real scenario: browsing rows are served while every OCA in a city is busy, because browse never touches an OCA; and video keeps playing during an AWS hiccup once the client has its URLs (inference from the split).

LayerProducts Netflix names
EdgeZuul, AWS ELB, UltraDNS + Route 53 (Active-Active, 2013)
ServicesJava on Spring Boot (2018), GraphQL DGS (2021)
RuntimeEC2, Titus containers on Mesos (2018)
DataCassandra, EVCache, S3, Kafka, Flink, Iceberg
DeliveryOpen Connect appliances

Control plane and data plane Must-know ​

In plain words: the part that decides and the part that delivers are different systems, built and scaled differently.

Common misunderstanding: "Caches decide what to cache." OCAs do not know about other OCAs or title popularity; "All of this information is aggregated and stored in the AWS control plane" (Source: Netflix and Fill, 2016).

Definition: the control plane holds state and makes decisions (what to store where, which cache serves whom); the data plane executes them (store files, serve ranges) and reports back.

1  control plane computes manifests: which titles each OCA should hold
2  OCA asks for its manifest at regular intervals, diffs it with its disk
3  OCA requests missing titles inside its fill window
4  control plane answers with ranked fill sources
5  OCA downloads, reports "stored", becomes a fill source for others

Real scenario: a faulty encode must be replaced everywhere; the control plane changes manifests and the OCAs converge, with "fast track" fills outside the normal cycle when urgent (Source: Netflix and Fill, 2016).

ConcernControl planeData plane
Holds member dataYesNo (Overview: no viewing history, DRM info or member data)
Knows popularityYesNo
Runs whereAWSISPs and IXPs
Talks BGPNoYes, with ISP routers (Overview)

How to use it: the generic pattern is in CDNs; the steering half is implemented in Go and Laravel.

Open Connect appliances Must-know ​

In plain words: Netflix ships its own cache servers to ISPs for free; the ISP gives power, space and a network port, and its customers stream from inside their own ISP.

Common misunderstanding: "Open Connect is a peering agreement." It is both: OCAs at internet exchange points (IXPs) reached by settlement-free interconnection (SFI), and embedded OCAs inside qualifying ISPs (Source: Open Connect Overview; openconnect.netflix.com).

Definition: an Open Connect Appliance (OCA) is a purpose-built ISP cache that "temporarily store[s] encoded video/image files" and serves them over HTTP/HTTPS. It reports status to AWS and serves content; it does nothing else (Source: Open Connect Overview).

1  ISP applies; Netflix sizes a site from local traffic (Overview)
2  Netflix ships OCAs; ISP racks them, configures BGP sessions
3  ISP decides which customers route to the embedded OCAs (Overview)
4  OCAs report health and routes; NOC monitors; failed boxes are replaced free
5  peering at an IXP remains the fallback and the fill path

Real scenario: a mid-size ISP with heavy evening Netflix traffic gets embedded OCAs so that most bytes never cross its transit links; a smaller ISP peers at the local exchange instead (Source: openconnect.netflix.com: embedded is "usually the most beneficial option" for substantial traffic).

DeploymentWhereWho pays whatSource
Embedded OCAInside ISPNetflix: hardware; ISP: power, space, connectivityOverview
IXP OCAExchange point, SFI peeringSettlement-freeOverview
HardwareCommodity PC parts, custom cases, redundant drives and PSUsFree to qualifying ISPs, not for saleAppliances page

Proactive fill and fill windows Must-know ​

In plain words: files are copied to caches at night, before anyone asks for them, so peak hours are spent only serving.

Common misunderstanding: "A CDN fills on cache miss." Commercial CDNs mostly do; Netflix says: "An important difference between our Open Connect CDN and other commercial CDNs is the concept of proactive caching." (Source: Netflix and Fill, 2016).

Definition: in a fill window (off-peak, configured per site) each OCA downloads the delta between its manifest and its disk from the cheapest available fill source. OCAs are grouped into manifest clusters (one content region, one popularity feed, a number of copies) and fill clusters (manifest clusters sharing region and feed, with escalation policies and a number of fill masters). Ranking: peer fill (same manifest cluster or subnet), then tier fill (outside the cluster), with S3 used by the elected fill masters; filters are title availability, fill health and route cost (BGP attributes, location, hops). Avoiding disk reads during writes removes read/write contention (Source: Netflix and Fill, 2016). Partners cannot widen the window; its start time is set from ISP input and traffic analysis (Source: Open Connect Partner Help Center).

Proactive fill: content is placed before members press PlayAmazon S3packaged encodesFill mastersshort escalation delayS3 fillFill cluster (shared content region + popularity feed)Manifest cluster AOCA OCA OCAManifest cluster BOCA OCA OCAtier fillpeer fill inside a cluster or subnetRank of fill sources returned by the AWS control plane: peer fill, then tier fill, then S3; filtered by title availability, fill health, route costfill window (off-peak), zone Afill window, zone further westpeak evening: serve only,no disk read/write contentionA title is "live" for serving once enough clusters hold enough copies
T  fill master M (one per title asset)          other OCA O in same fill cluster
1  window opens; manifest lists title X           window opens; manifest lists X
2  asks control plane: fill sources for X         asks: fill sources for X
3  told: S3 (its policy reaches far, soon)        told: nothing yet (policy: wait)
4  downloads X from S3, reports "stored"
5                                                 asks again: told M (tier/peer fill)
6                                                 downloads from M, reports "stored"
7  window moves west with the sun; X is "live" once enough clusters hold copies

Real scenario: a launch-day title; old titles that leave the manifest go to a delete manifest and are removed only after live sessions cannot be interrupted (Source: Netflix and Fill, 2016).

Knob (Netflix name)Meaning
Fill windowOff-peak period when OCAs download
Manifest clusterOCAs sharing region, popularity feed, copy count
Fill clusterManifest clusters sharing region and feed
Fill masterOCA elected to fetch first and share
Escalation policyHow many hops, how long to wait, whether S3 is allowed
Fast track fillOut-of-cycle fill for urgent fixes

How to use it: the escalation logic is the AllowedTiers and InFillWindow functions in the Go steering example.

Playback, steering and DRM Important ​

In plain words: pressing Play is a short conversation with AWS that ends with a list of cache URLs and a licence; then the device talks only to caches.

Common misunderstanding: "The cache checks whether you may watch." OCAs hold no DRM info; authorisation and licensing are checked by playback services in AWS (Source: Open Connect Overview).

Definition: steering is the AWS service that, for each requested file, picks OCAs by "file availability, health, and network proximity" and generates their URLs (Source: Open Connect Overview). DRM (digital rights management) is the licence system that lets only an authorised device decrypt the files; Netflix's Overview says only that DRM info is not on OCAs and licensing is checked in AWS. Which DRM systems run on which device is not described in the sources fetched for this page; that the files are encrypted once and licences are issued per session is the usual industry design (inference).

1  client -> AWS playback: play title 42 (device caps, network estimate)
2  AWS: authorise member, check licence for country, choose streams
3  AWS steering: rank OCAs holding those files for this client prefix
4  AWS -> client: ranked URLs per stream (+ licence exchange, inference)
5  client -> OCA #1: byte ranges of the chosen bitrate
6  OCA #1 slow -> client moves to URL #2 without asking AWS (inference)

Real scenario: a member travels; the country check in step 2 changes which titles may be played, while the OCA selection in step 3 changes because the client prefix is now another ISP.

DecisionMade byInput
May this member play this title here?Playback services (AWS)Account, licence, country
Which files?Playback servicesDevice capabilities, network conditions
Which OCAs?SteeringStored files, health, BGP routes
Which bitrate now?Client ABRThroughput, buffer

Chunked encoding pipeline Must-know ​

In plain words: a movie is cut into pieces, each piece is inspected and encoded on a different machine, and the pieces are stitched and checked.

Common misunderstanding: "Encoding is one long job per file." It was: "Before we implemented parallel chunked encoding, a 1080p movie could take days to encode" (Source: High Quality Video Encoding at Scale, 2015).

Definition: "Long processing jobs are divided into smaller tasks and parallelized to reduce end-to-end delay and local storage requirements." Sources (preferably IMF; also ProRes, DPX, MPEG) are inspected in chunks; bad sources are rejected and redelivery requested; each encoded chunk is verified at once; an assembler stitches chunks and validates them against source fingerprints; the pipeline runs on an internal spot market so a killed instance loses only a small task (Source: High Quality Video Encoding at Scale, 2015). With per-shot encoding, shots are collated into roughly 3-minute chunks and checkpoints save each finished shot (Source: Optimized shot-based encodes, 2018). The media platform was later rebuilt as Cosmos, "a platform for workflow-driven, media-centric microservices" (Source: The Netflix Cosmos Platform, 2021).

From studio master to playable files: everything is split, parallel, checkedSource (IMF)reject if badInspect chunksfingerprintsShot detectioncollate into chunksParallel encode workersshot 1shot 2shot 3shot ...checkpoint per shotDynamic OptimizerVMAF, best points per bitrateAssemble + validatevs source fingerprintsPackage per codecAVC, HEVC, VP9, AV1 + DRMAmazon S3then Open Connect fillOne lost instance costs one shot, not one movie; a 1-hour episode is about 900 shots of 4 s (Netflix, 2018)
1  ingest master; inspection indexes byte offsets, splits into chunks
2  chunks inspected in parallel; aggregator accepts or rejects (4K in < 15 min)
3  shot detection; shots collated into ~3-minute chunks
4  worker encodes each shot; checkpoint after each shot
5  worker lost -> chunk retried on another instance from the last checkpoint
6  assembler stitches; fingerprints compared with source; quality metrics computed
7  package, upload to S3, mark title ready -> Open Connect fill

Real scenario: a frame dropped at a chunk boundary is caught by the fingerprint comparison before release rather than by a member call to customer support (Source: 2015 post, which lists frozen frames and inserted black frames as issues once found via support).

PropertyBefore (2015 post)After
1080p movieDaysA few hours, target 30 minutes
Failure late in jobRestartRetry one chunk (2015), one shot (2018)
Encode reliability99.99% or better for sources that pass inspection

Per-title and per-shot encoding Must-know ​

In plain words: a cartoon needs fewer bits than a grainy war film for the same picture quality, so each title (and later each shot) gets its own bitrate ladder.

Common misunderstanding: "Higher bitrate is always better quality." Past a point quality stops improving visibly; the 2015 post shows a simple animation where 2350 kbps at 1080p is already high quality and 5800 kbps adds nothing noticeable.

Definition: per-title encoding: "we run analysis on an individual title to determine the optimal encoding recipe based on its complexity" (Source: Per-Title Encode Optimization, 2015). It replaced a fixed bitrate ladder chosen in 2010. Per-chunk optimisation followed for mobile downloads in December 2016; the Dynamic Optimizer moved to shots ("natural atoms" of similar frames), encoding each shot at several resolutions and quantisation parameters and choosing the optimal trajectory with VMAF, Netflix's perceptual quality metric, as the objective (Source: Dynamic Optimizer, 2018; Optimized shot-based encodes, 2018).

1  encode the title at several resolutions x QPs (trial encodes)
2  measure bitrate and quality (PSNR in 2015 plots, VMAF later) per point
3  keep the upper frontier: best quality for each bitrate (convex hull)
4  pick ladder rungs on the frontier: per title (2015), per shot (2018)
5  key frames at shot boundaries: no prediction penalty inside a shot

Real scenario: a member on a 1750 kbps link gets HD for a cartoon instead of SD from the fixed ladder (Source: 2015 post); a phone user on cellular gets AV1 in "Save Data" mode (Source: AV1 on Android, 2020).

GenerationUnitYearSource
Fixed ladderAll titles alike2010Per-Title (2015)
Per-titleTitle2015Per-Title (2015)
Per-chunk (mobile)Chunk2016Dynamic Optimizer (2018)
Per-shot (Dynamic Optimizer)Shot2018Shot-based encodes (2018)

How to use it: the frontier and rung selection are in the Go ladder example.

Codecs and adaptive streaming Important ​

In plain words: each title exists in several codecs and many bitrates; the player keeps switching between them as the network changes.

Common misunderstanding: "One codec for everyone." Devices differ; the 2015 encoding post lists VC1, H.264/AVC Baseline, H.264/AVC Main and HEVC, at 100 kbps to 16 Mbps; VP9 mobile encodes came in 2016; AV1 reached Android in 2020 with 20% better compression than Netflix's VP9 encodes, and TVs in 2021 via hardware decoders (Source: 2015, 2020, 2021 posts).

Definition: adaptive bitrate (ABR) streaming: the client "adaptively selects the optimal stream given the instantaneous bandwidth" (Source: High Quality Video Encoding at Scale, 2015). The list of streams and their URLs reaches the client from the playback service; a manifest in the generic sense (HLS playlist, DASH MPD) is explained in CDNs: video streaming. Netflix's own playback manifest format is not described in the fetched sources (inference: it plays the same role).

1  device tells playback service which codecs it decodes (AV1? HEVC? VP9?)
2  service returns streams it may use, per codec and bitrate
3  player starts low, measures throughput and buffer
4  throughput drops -> next segment from a lower rung
5  buffer healthy -> step up; keyframes at shot boundaries hide switches

Real scenario: a TV with an AV1 hardware decoder gets AV1; an older TV gets AVC or HEVC; the same title, different files, same OCA.

CodecNetflix mentionYearSource
H.264/AVCMain encodes since late 20102010Per-Title (2015)
HEVCAmong codec profiles2015Encoding at Scale (2015)
VP9Mobile encodes, then shot-based2016, 2018AV1 on Android (2020)
AV1Android (dav1d decoder), then TVs2020, 2021AV1 posts

Zuul Must-know ​

In plain words: one programmable front door in front of every cloud service, which routes, protects and observes all traffic.

Common misunderstanding: "Going async made Zuul 2 faster and cheaper." Netflix wrote that "our aspirations have differed from the results"; the main win was connection scaling, while debugging got harder (Source: Zuul 2: The Netflix Journey, 2016).

Definition: Zuul is an "L7 application gateway that provides capabilities for dynamic routing, monitoring, resiliency, security, and more" (Source: Zuul README). Zuul 1 ran on the Servlet model (one thread per connection); Zuul 2 runs on Netty with an event loop; filters are inbound (auth, routing, decoration), endpoint (static response or proxy to an origin) and outbound (gzip, metrics, headers). In 2018 Netflix ran more than 80 Zuul 2 clusters to about 100 backend clusters at more than 1 million requests per second (Source: Open Sourcing Zuul 2, 2018). Zuul also moved traffic between regions during failover (Source: Active-Active, 2013; Nimble, 2018).

device -> DNS (UltraDNS -> Route 53 -> ELB) -> Zuul
1  inbound filters: authenticate, pick origin, tag request
2  mis-routed (wrong region for this user)? isthmus: proxy to the right region
3  endpoint filter: proxy to API origin (or static response)
4  outbound filters: metrics, headers, gzip
5  overload: shed early at the edge instead of deep in the graph

Real scenario: during region evacuation Zuul proxies traffic to the destination region via back-end tunnels to cover DNS TTL delays, in increments so new instances can warm up (Source: Project Nimble, 2018).

VersionModelYearSource
Zuul 1Blocking, Servlet2013 OSSZuul README, Active-Active
Zuul 2Async, Netty2016 prod, 2018 OSSZuul 2 posts

API evolution: OSFA REST, device APIs, GraphQL federation Must-know ​

In plain words: first one API for every device, then each device team got the API shaped for its screen, then a shared graph that many teams contribute pieces to.

Common misunderstanding: "GraphQL federation replaced everything at Netflix." The 2020 post says it was deployed "for Netflix's studio ecosystem" and that other domains were being explored.

Definition: in 2012 Netflix found the "one-size-fits-all (OSFA) REST API" limiting across 800+ device types and turned the API into "a platform for API development" for internal UI teams (Source: Embracing the Differences, 2012): that is the backend-for-frontend (BFF) idea. In 2020: "Rather than exposing 100s of microservices to UI developers, Netflix offers a unified API aggregation layer at the edge." Federation splits it: each Domain Graph Service (DGS) owns part of the schema; a Schema Registry validates and composes the unified schema; the GraphQL Gateway builds a query plan and calls the owning DGSs (Source: How Netflix Scales its API with GraphQL Federation, 2020). The DGS framework (Spring Boot, graphql-java, schema-first preferred) was open-sourced in 2021 (Source: DGS post, 2021; dgs-framework README).

1  team pushes DGS schema change -> Schema Registry validates it alone
2  registry composes with all other DGS schemas; rejects breaking composition
3  gateway receives composed schema
4  client query { movie { title, cast, productionSchedule } }
5  gateway query plan: movie from Movie DGS, schedule from Production DGS
6  gateway merges results by entity key and returns one response

Real scenario: "Inconsistent data across different Studio applications was the top support issue in Studio Engineering in 2018"; a single curated graph where "every field in GraphQL resolves to a single piece of data-fetching code" addressed it (Source: Federation, 2020).

StageOwner of aggregationProblem it solvedProblem it created
OSFA REST (to 2012)API teamOne contractDevices differ (memory, formats)
Device-specific API (2012)UI teams on API platformPer-device shapeDuplicate aggregation code
Studio API monolith graphCentral graph teamOne graphBottleneck as teams grew
Federation + DGS (2020)Domain teamsDistributed ownershipGateway, registry to operate

How to use it: schemas and resolvers in GraphQL; gateway vs BFF in API Gateway, BFF & Service Mesh.

Hystrix and its retirement Important ​

In plain words: Hystrix wrapped every remote call with a timeout, a separate thread pool or semaphore, a circuit breaker and a fallback; Netflix later stopped developing it.

Common misunderstanding: "Hystrix is deprecated because circuit breakers are wrong." The README says the opposite: the move is "in no way an indication that the concepts and ideas from Hystrix are no longer valuable".

Definition: Hystrix is "a latency and fault tolerance library designed to isolate points of access to remote systems" and "stop cascading failure" (Source: Hystrix README). It grew from API-team work begun in 2011; by 2012 "tens of billions of thread-isolated and hundreds of billions of semaphore-isolated calls" ran through it daily (Source: Introducing Hystrix, 2012). Status: "Hystrix is no longer in active development, and is currently in maintenance mode." Final release 1.5.18; focus shifted to "adaptive implementations that react to an application's real time performance rather than pre-configured settings"; Resilience4j recommended for new projects (Source: Hystrix README).

1  call wrapped in a command with timeout and its own thread pool (bulkhead)
2  dependency slow: pool fills, extra calls rejected at once, fallback served
3  error rate over threshold: circuit opens, calls short-circuit to fallback
4  after a sleep window: one trial call; success closes the circuit
5  every setting is static: chosen by a person, stale after the next change

Real scenario: a ratings service is slow; the home page renders without star ratings (fallback) instead of hanging (inference, an illustration of the fallback idea in the 2012 post).

IdeaHystrix (2012)Successor
IsolationThread pool or semaphore per dependencyConcurrency limit per server/client
TrippingStatic error thresholdLatency gradient, adaptive
LibraryNetflix Hystrixconcurrency-limits (Netflix), Resilience4j

How to use it: mechanics in Circuit Breaker and Bulkheads.

Adaptive concurrency limits Must-know ​

In plain words: each server keeps learning how many requests it can handle at once by watching its own latency, and rejects the excess immediately.

Common misunderstanding: "Rate limits (requests per second) protect a service." The concurrency-limits README argues RPS limits from stress tests "quickly [go] out of date" in an autoscaling system; concurrency (in-flight requests) is the right unit, by Little's law, Limit = Average RPS * Average Latency.

Definition: "Adaptive concurrency limits fundamentally improve how an application behaves under extreme load, and allow us to avoid cascading service failures." The algorithm borrows from TCP congestion control: gradient = RTTnoload / RTTactual; the new limit is the current limit times the gradient plus an allowed queue size, defaulting to the square root of the current limit (Source: Performance Under Load, 2018). The library also offers Vegas (queue estimate L * (1 - minRTT/sampleRtt), alpha 2-3, beta 4-6), Gradient2, and AIMD for clients; gRPC servers reject with Status.UNAVAILABLE; limits can be partitioned (for example live 90%, batch 10%) (Source: concurrency-limits README). Limits are per server without coordination; "a single client retry is nearly 100% successful" at reaching another instance (Source: 2018 post).

T   limit  inflight  sample RTT  min RTT  gradient  new limit
1   20     5         10 ms       10 ms    1.0       20*1.0 + 4.5  = 24.5
2   24     24        10 ms       10 ms    1.0       24*1.0 + 4.9  = 28.9
3   28     28        30 ms       10 ms    0.5 (cap) 28*0.5 + 5.3  = 19.3
4   19     19+1      -           -        -         request 20 -> 503 shed
5   19     12        11 ms       10 ms    0.91      19*0.91 + 4.4 = 21.7

Real scenario: a dependency slows and latency rises; instead of queueing until timeouts cascade, the server shrinks its limit and sheds; the caller retries once on another instance, while autoscaling catches up (Source: 2018 post).

ApproachUnitWho sets itGoes stale?
Token bucket RPS limitRequests/sOperator after stress testYes
Fixed concurrency (Hystrix pools)In-flightOperatorYes
Adaptive (gradient, Vegas)In-flightThe server itselfNo (re-learns)

How to use it: Go and Laravel below; overload theory in Load Shedding and Timeouts, Retries & Jitter.

Chaos Monkey, FIT and ChAP Must-know ​

In plain words: break things in production on purpose, in small, watched doses, so the real outage finds nothing new.

Common misunderstanding: "Chaos Monkey is random destruction." It runs "in the middle of a business day, in a carefully monitored environment with engineers standing by" (Source: The Netflix Simian Army, 2011).

Definition: Chaos Monkey is "a tool that randomly disables our production instances to make sure we can survive this common type of failure without any customer impact" (Source: Simian Army, 2011); the Simian Army added Latency Monkey, Conformity Monkey, Doctor Monkey and others. Today's Chaos Monkey "randomly terminates virtual machine instances and containers" and requires Spinnaker (Source: chaosmonkey README). Chaos Kong covers regional failures. FIT injects microservice-level failures; ChAP (Chaos Automation Platform) launches an experiment cluster and a control cluster from the service's deployment pipeline, routes a small slice of traffic to each, injects a FIT scenario into the experiment, and compares KPIs tracked by a Mantis job (Source: ChAP, 2017).

1  ChAP reads the service's pipeline (Spinnaker) to clone its config
2  launches control cluster and experiment cluster, tiny traffic share each
3  FIT scenario applied to experiment requests only (e.g. dependency fails)
4  Mantis job tracks KPIs (e.g. stream starts) per population
5  divergence beyond threshold -> stop early; report to service owner

Real scenario: testing whether a service degrades gracefully when its recommendations dependency fails, on a fraction of a percent of users instead of a whole region (Source: ChAP, 2017, which explains FIT's whole-system noise problem).

ToolFailure injectedScopeYear
Chaos MonkeyInstance or container killedOne node2011
Latency MonkeyArtificial delayClient-server layer2011
Chaos KongRegion failureRegionNamed in ChAP (2017)
FITMicroservice failureRequest-levelBefore 2017
ChAPFIT inside an A/B-style experimentSmall traffic slice2017

How to use it: method, blast radius and game days in Chaos Engineering.

Active-active and Nimble evacuation Must-know ​

In plain words: two (later more) AWS regions serve users at the same time; if one breaks, all users are moved to the others within minutes.

Common misunderstanding: "Multi-region means synchronous replication." Netflix's rules were the opposite: "Services must be stateless", resources are accessed in-region, no cross-region calls on the user path, and data replication is asynchronous (Source: Active-Active, 2013).

Definition: in 2013 Netflix ran active-active across US-East-1 and US-West-2: users are geo-DNS routed roughly 50/50 with UltraDNS (directional) in front of Route 53 (fast CNAME switch) in front of ELBs; Zuul detects mis-routed requests and can proxy them ("isthmus" mode) or declare a region in "failover" mode; Cassandra replicates multi-region asynchronously; EVCache invalidates across regions via SQS (Source: Active-Active, 2013). Project Nimble (2018) cut regional failover from about 50 minutes to 8 by keeping "dark" capacity in shadow autoscaling groups that have finished start-up but are hidden from traffic and metrics until the switch (Source: Project Nimble, 2018).

Before Nimble (Source: Nimble, 2018)          With Nimble
1  5 min   decide to fail over                 decide
2  3-5 min provision capacity in AWS           (capacity already up, dark)
3  25 min  instances boot, register, warm      activate shadow ASGs
4  10+ min Zuul proxies traffic in steps       flip DNS
5  5 min   DNS TTL moves devices               devices move with TTL
   ~50 min total                               8 min total

Real scenario: a bad deploy breaks a critical service in one region; Netflix's 2013 post says regional infrastructure outages are "extremely unlikely" but "our pace of change sometimes breaks critical services in a region", which is the case evacuation is for.

MechanismProductPurposeSource
Directional DNSUltraDNSRoute regions of North America to regionsActive-Active
Switch layerRoute 53 CNAMEsFast traffic movesActive-Active
Edge routingZuul isthmus/failover modesMis-routed and evacuated trafficActive-Active
DataCassandra multi-region asyncUser state in both regionsActive-Active
CacheEVCache + SQS invalidationKeep caches honestActive-Active
Warm spareShadow ASGs8-minute evacuationNimble

How to use it: DNS steering in IP, DNS & GeoDNS; RTO/RPO planning in Capacity Planning & DR.

Cassandra Important ​

In plain words: Netflix keeps user-facing data in Apache Cassandra because it scales by adding nodes and replicates across regions on its own.

Common misunderstanding: "Cassandra multi-region means reads always see the latest write." Netflix tested it: after writing 1 million records in one region, a read 500 ms later in the other region found all of them, under production load; that is a measurement, not a guarantee (Source: Active-Active, 2013).

Definition: a leaderless wide-column store with tunable consistency. Netflix used CL_LOCAL_QUORUM and CL_ONE for in-region consumption and multi-directional async replication between regions (Source: Active-Active, 2013). Its 2011 benchmark scaled linearly from 48 to 288 instances, 1.1 million client writes/s, 3.3 million with three-zone replication (Source: Benchmarking Cassandra, 2011).

1  write in US-East with LOCAL_QUORUM: 2 of 3 local replicas ack
2  coordinator ships the write to US-West asynchronously
3  user is moved to US-West by DNS 300 ms later
4  read with LOCAL_QUORUM in US-West: usually sees the write (500 ms test),
   occasionally not yet: the application must tolerate it (inference)

Real scenario: viewing history and bookmarks must survive a region evacuation; the async copy in the other region is the reason the evacuated user still sees them.

SettingMeaningNetflix use
LOCAL_QUORUMMajority of replicas in the local DCIn-region reads/writes
ONEOne replicaLow-latency, weaker reads
Multi-region replicationAsync to other DCsActive-active

How to use it: internals in Cassandra & ScyllaDB; replication modes in Replication Topologies.

EVCache Important ​

In plain words: a memcached-based cache with one copy per availability zone, so losing a zone loses no cache.

Common misunderstanding: "A cache is a database with a TTL." EVCache is "Ephemeral", "Volatile" (data can be evicted at any time) "Cache" (Source: EVCache README); it is designed to be lost.

Definition: "a memcached & spymemcached based caching solution" for AWS EC2 (Source: EVCache README). An EVCache app is a group of memcached servers, each with a Java sidecar that registers with Eureka; data is sharded with Ketama consistent hashing; an app can be in several clusters (one per zone) with data replicated between them; a damaged cluster can be set to "write only" while reads go elsewhere (Source: Announcing EVCache, 2013). In active-active, a write in one region sends an SQS message to invalidate the key in the other: "Whenever there is a write in one region, EvCache client will send a message to another region (via SQS) to invalidate the corresponding entry." (Source: Active-Active, 2013).

1  client writes key k: to every zone's copy (zone A, B, C)
2  client reads k: from its own zone first
3  zone B instance lost: zone B set write-only, reads go to A or C
4  write in us-east: SQS message -> us-west client deletes k there
5  next us-west read misses, reloads from Cassandra

Real scenario: home-page rows computed offline are kept only in EVCache ("ephemeral calculated data that only exists in Memcached", Source: Active-Active, 2013); a miss triggers recomputation or a fallback.

FeatureEVCachePlain memcached
ReplicationPer zone, client-sideNone
ShardingKetama consistent hashingClient-dependent
DiscoveryEureka via sidecarStatic lists
Cross-regionInvalidation via SQSNone

How to use it: patterns in Caching; hashing in Consistent Hashing.

Keystone, Kafka, Flink and Iceberg Important ​

In plain words: every service drops events into one pipeline; the pipeline routes them to storage and to stream jobs; the warehouse stores them in tables that many engines can read.

Common misunderstanding: "Metrics go through the data pipeline." "Note that operational metrics don't flow through this data pipeline", they go to Atlas (Source: Evolution of the Netflix Data Pipeline, 2016).

Definition: the first pipeline used Chukwa to S3 for Hadoop/Hive, up to 10 minutes latency; Keystone went live in December 2015 with Kafka for sub-minute needs (Source: 2016 post). By 2018 Keystone was the "data backbone": a Kafka-based Messaging Service, a Routing Service where each route is a stream job delivering to managed sinks (Elasticsearch, Hive, Kafka) "with at-least-once delivery semantics", and Stream Processing as a Service on Flink, one Flink cluster per job, with RDS as source of truth for desired state (Source: Keystone, 2018). For tables, Iceberg was created at Netflix: "Iceberg is a new table format for storing large, slow-moving tabular data", later donated to the Apache Software Foundation (Source: Netflix/iceberg README).

1  service emits event -> Kafka topic (Messaging Service)
2  routing job: filter/project -> sink (Hive table, Elasticsearch, Kafka)
3  at-least-once: consumers must tolerate duplicates
4  SPaaS: team-owned Flink job reads the same topic, writes its own output
5  batch side: tables in Iceberg format read by Spark/Presto

Real scenario: an A/B test's play events land in the warehouse for analysis while the same events feed a real-time dashboard; the dashboard and the report may disagree for a few minutes (inference).

EraTransportLatencySource
ChukwaS3 sequence files to HiveUp to 10 min2016 post
Keystone v1KafkaSub-minute2016 post
Keystone 2018Kafka + Flink SPaaSNear real time2018 post

How to use it: Kafka, Stream Processing, Delivery Guarantees, OLTP vs OLAP.

Eureka, Ribbon and Spring Cloud Netflix Good to know ​

In plain words: services register themselves in Eureka; callers fetch the list and pick an instance themselves (client-side load balancing with Ribbon).

Common misunderstanding: "Spring Cloud Netflix is what Netflix runs." It was a community project (1.0 in 2015) wrapping Netflix OSS in Spring Boot; Netflix itself adopted Spring Boot in 2018 and intended to replace "aging Netflix software" with community options such as Spring Cloud Load Balancer (Source: Netflix OSS and Spring Boot, 2018).

Definition: Eureka is "a RESTful (Representational State Transfer) service that is primarily used in the AWS cloud for the purpose of discovery, load balancing and failover of middle-tier servers" (Source: Eureka README). Ribbon is "a client side IPC library" for load balancing and fault tolerance, now "On Maintenance"; "Our team has instead started building an RPC solution on top of gRPC." (Source: Ribbon README).

1  instance boots, registers with Eureka, sends heartbeats
2  client caches the registry, refreshes periodically
3  client (Ribbon) picks an instance (e.g. round robin, zone-aware)
4  instance dies: heartbeats stop, Eureka evicts it; clients stop picking it
5  Nimble: dark instances are deliberately not registered until activation

Real scenario: in Nimble, registering with Eureka was one of the steps of the 25-minute start-up that dark capacity skips (Source: Project Nimble, 2018).

PieceRoleStatus (source)
EurekaRegistryREADME active
RibbonClient load balancingMaintenance; gRPC instead
HystrixFault toleranceMaintenance
Archaius, GovernatorConfig, DINamed in 2018 post
Spring BootCore Java frameworkAdopted 2018

How to use it: Service Discovery, Load Balancing.

Titus Good to know ​

In plain words: Netflix's own container platform on AWS, used for batch, encoding, ML and services.

Common misunderstanding: "Netflix runs Kubernetes, so Titus is Kubernetes." Titus "shares a foundation of Apache Mesos" (2018), and its GitHub repository is now archived (Source: Titus post, 2018; Titus README).

Definition: Titus manages containers for "video streaming, recommendations and machine learning, big data, content encoding, studio technology"; it grew from batch to services, reaching "as many as three million containers launched per week in April 2018" over "seven regionally isolated stacks across tens of thousands of EC2 virtual machines" (Source: Titus, 2018).

1  developer builds a container image
2  Titus schedules it onto EC2 hosts in one regional stack
3  batch job: run to completion; service: kept running behind discovery
4  stacks are regionally isolated: a bad stack hurts one region

Real scenario: encoding jobs and online services share one container platform, so idle service capacity can absorb batch work (inference, consistent with the internal spot market in the 2015 encoding post).

PlatformFoundationStatus
TitusApache Mesos, EC2Archived repository
KubernetesGenericSee Containers & Kubernetes

Spinnaker and Kayenta Important ​

In plain words: every deploy is a pipeline; a canary of the new version is compared with a fresh baseline of the old one before the rest of traffic moves.

Common misunderstanding: "Compare the canary with production." Netflix creates a new baseline cluster because a long-running production cluster "could produce unreliable results" (Source: Automated Canary Analysis with Kayenta, 2018).

Definition: Spinnaker is "an open source multi-cloud Continuous Delivery platform" (2015) that replaced Asgard; pipelines of stages (bake image, deploy, Jenkins job, manual judgement); red-black deploys, Netflix's name for blue-green (Source: Global Continuous Delivery with Spinnaker, 2015). Kayenta is automated canary analysis: production cluster unchanged, a baseline cluster (typically 3 instances) of the current version and a canary cluster (typically 3) of the new one; Spinnaker runs the analysis and continues, rolls back, or asks for a human (Source: Kayenta, 2018).

1  pipeline bakes image, deploys baseline (old, 3 inst) + canary (new, 3 inst)
2  traffic split: small share each
3  Kayenta pulls metrics for both from the time-series database
4  statistical comparison per metric -> score
5  pass: red-black deploy of new cluster; fail: canary destroyed, traffic stays

Real scenario: a config change raises error rates by 2% on the canary only; Kayenta's score fails and the change never reaches the production cluster.

StrategyWhat runsRollback
Red-black (blue-green)Old and new clusters side by sideSwitch back
Canary with KayentaBaseline + canary + productionDestroy canary
Chaos Monkey on Spinnaker appsKills instances of managed appsNot a rollout

Personalisation and A/B testing Must-know ​

In plain words: almost everything a member sees is chosen by a model, and every change to those choices is an experiment first.

Common misunderstanding: "The Netflix Prize algorithm runs Netflix." Two Prize algorithms (matrix factorisation and RBM) were put into production; the final Grand Prize ensemble was not, because the measured gains "did not seem to justify the engineering effort" (Source: Netflix Recommendations: Beyond the 5 stars, 2012).

Definition: "every product change Netflix considers goes through a rigorous A/B testing process before becoming the default user experience" (Source: Experimentation Platform, 2016). Members are allocated to cells (one is the default/control) by batch allocation (queries) or real-time allocation (rules evaluated while the user interacts); the A/B Server returns all test/cell memberships to the client; test metadata and rules are stored in Cassandra; ABlaze is the front end (Source: 2016 post). Feature stores and model serving are not described in the sources fetched here; see ML Systems for the generic designs (inference that Netflix has equivalents).

1  app starts: A/B Client asks A/B Server for this member's tests
2  server returns batch allocations already known
3  server evaluates real-time rules with context (country, device, app version)
4  allocates to new non-conflicting tests, returns full set of cells
5  app renders the cell's experience; events flow to Keystone for analysis

Real scenario: artwork per title is A/B tested, "sometimes resulting in 20% to 30% more viewing for that title" (Source: Experimentation Platform, 2016).

AllocationProCon
BatchAny query, known sizeCannot catch new members or live behaviour
Real-timeContext-aware, new membersAdds latency to the call, size hard to predict

Atlas, Mantis and tracing Important ​

In plain words: dimensional metrics for dashboards and alerts (Atlas), a stream platform for questions that need seconds (Mantis), and traces to follow one member's playback across services (Edgar on Zipkin).

Common misunderstanding: "Trace everything at 100%." Netflix uses a hybrid: 100% for a configurable set of requests, random sampling otherwise, plus tail sampling in Mantis (Source: Building Netflix's Distributed Tracing Infrastructure, 2020).

Definition: "In 2012, we started building Atlas, our next-generation monitoring platform"; it sustained more than 1.2 billion time series during a failover exercise (Source: Introducing Atlas, 2014). Mantis is a platform for "cost-effective, realtime, operations-focused" applications; "Mantis reduces that from tens of minutes down to seconds, effectively reducing our Mean-Time-To-Detect" (Source: Open Sourcing Mantis, 2019). Tracing: "We adopted Open-Zipkin's B3 HTTP header based context propagation mechanism"; traces flow to Mantis jobs that buffer spans and tail-sample; Edgar is the troubleshooting UI (Source: Tracing, 2020). B3 headers are X-B3-TraceId, X-B3-SpanId, X-B3-ParentSpanId, X-B3-Sampled, X-B3-Flags (Source: openzipkin b3-propagation README, not Netflix).

1  device request enters Zuul; trace id assigned (B3 headers)
2  each service propagates headers, emits spans with service/ASG/container tags
3  spans -> Mantis job: buffer per trace, tail sampling in a second job
4  storage; Edgar joins traces with logs for one streaming session
5  meanwhile: Atlas counters drive dashboards and alerts (inference: and canary metrics)

Real scenario: "Why doesn't Tiger King play on my phone?": an on-call engineer opens the member's session in Edgar and follows the failing call (Source: Tracing, 2020).

SignalNetflix systemYearGeneric chapter
MetricsAtlas2012 build, 2014 OSSObservability
Real-time streamsMantis2019 OSSStream Processing
TracesZipkin libraries, Mantis, Edgar2020 postAlerting

Mechanics ​

The published knobs and numbers ​

MechanismKnob or valueSource
Gradient limitgradient = RTTnoload / RTTactual, queue = sqrt(limit)Performance Under Load (2018)
Vegas limitqueue = L * (1 - minRTT/sampleRtt); +1 if queue below alpha (2-3), -1 above beta (4-6)concurrency-limits README
gRPC shedStatus.UNAVAILABLEconcurrency-limits README
Partitioninge.g. live 0.9, batch 0.1concurrency-limits README
CassandraCL_LOCAL_QUORUM, CL_ONEActive-Active (2013)
Cross-region replicationAll of 1M records readable after 500 msActive-Active (2013)
DNS failoverBulk of devices move within about 5 minutes (TTL)Nimble (2018)
Nimble50 min to 8 min; team of two, about six monthsNimble (2018)
KayentaBaseline 3 instances, canary 3 instances typicalKayenta (2018)
Fill rankingPeer fill, tier fill; masters fetch from S3Netflix and Fill (2016)
Encoding100 kbps to 16 Mbps; 4K inspection under 15 minutesEncoding at Scale (2015)
ShotsAverage shot about 4 s; ~900 shots per hourShot-based encodes (2018)

Status codes and messages you meet ​

WhereCode / messageMeaningCorrect reaction
HTTP server with a concurrency limit503 Service Unavailable + Retry-AfterShed by limiter (this page's code)Retry once on another instance
gRPC server with concurrency-limitsUNAVAILABLEShed by limiterRetry once elsewhere
Hystrixshort-circuited / rejected (fallback)Circuit open or pool fullServe fallback
Zuul (generic gateway)502, 504Origin error or timeoutInspect origin, not the gateway (inference)
CassandraUnavailable / timeout at the chosen CLNot enough replicas answeredRetry or lower CL deliberately

What a playback start costs ​

Rough sequence for one Play (inference, illustrating Overview steps 2-6)
1  DNS + TLS to Netflix API edge              tens of ms (cached after first)
2  Zuul -> playback services (AWS)            a few internal calls
3  steering lookup (precomputed cache state)  milliseconds
4  licence exchange (DRM)                     one round trip
5  first video range from in-ISP OCA          short RTT, no transit

Go ​

The Go code re-implements three mechanisms in small, tested form. None of it is Netflix code; weights and constants are illustrative.

Before: a fixed concurrency limit ​

A limit measured once in a load test. It works until the instance type, a dependency or the code path changes.

go
// Package fixedlimit is the "before": a concurrency limit picked once from a
// load test. It protects the server, but the number goes stale as soon as
// instance types, dependencies or code paths change.
package fixedlimit

import "net/http"

// Limit wraps h and rejects requests beyond max in flight with 503.
func Limit(max int, h http.Handler) http.Handler {
	sem := make(chan struct{}, max)
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		select {
		case sem <- struct{}{}:
			defer func() { <-sem }()
			h.ServeHTTP(w, r)
		default:
			http.Error(w, "over concurrency limit", http.StatusServiceUnavailable)
		}
	})
}

After: an adaptive gradient limit ​

The 2018 formula, with gradient clamped to [0.5, 1], a loss reaction that halves the limit on a timeout, and HTTP middleware that sheds with 503 and Retry-After.

go
// Package conclimit is a small re-implementation of the gradient idea that
// Netflix described in "Performance Under Load" (2018):
//
//	gradient = RTTnoload / RTTactual
//	newLimit = currentLimit * gradient + queueSize, queueSize = sqrt(limit)
//
// It is NOT the Netflix concurrency-limits library (Java); it omits its
// smoothing windows, percentile sampling and partitioning. Use it to learn the
// mechanism, use a maintained library in production.
package conclimit

import (
	"math"
	"net/http"
	"sync"
	"time"
)

// Limiter tracks in-flight requests against an adaptive limit.
type Limiter struct {
	mu       sync.Mutex
	limit    float64
	inflight int
	minRTT   time.Duration // best observed latency: the "no load" estimate
	Min, Max float64
}

// New returns a limiter starting at initial, bounded to [min, max].
func New(initial, min, max float64) *Limiter {
	return &Limiter{limit: initial, Min: min, Max: max}
}

// Limit returns the current limit rounded down.
func (l *Limiter) Limit() int {
	l.mu.Lock()
	defer l.mu.Unlock()
	return int(l.limit)
}

// TryAcquire takes a slot or reports false when the server should shed.
func (l *Limiter) TryAcquire() bool {
	l.mu.Lock()
	defer l.mu.Unlock()
	if l.inflight >= int(l.limit) {
		return false
	}
	l.inflight++
	return true
}

// Release returns a slot and feeds one latency sample into the limit.
// dropped=true (timeout or error caused by overload) halves the limit,
// the loss-based reaction borrowed from TCP.
func (l *Limiter) Release(rtt time.Duration, dropped bool) {
	l.mu.Lock()
	defer l.mu.Unlock()
	l.inflight--
	if dropped {
		l.limit = l.clamp(l.limit / 2)
		return
	}
	if l.minRTT == 0 || rtt < l.minRTT {
		l.minRTT = rtt
	}
	gradient := float64(l.minRTT) / float64(rtt)
	// Do not collapse on one slow sample, do not grow faster than 1x.
	gradient = math.Max(0.5, math.Min(1.0, gradient))
	queue := math.Sqrt(l.limit)
	l.limit = l.clamp(l.limit*gradient + queue)
}

func (l *Limiter) clamp(v float64) float64 {
	return math.Max(l.Min, math.Min(l.Max, v))
}

// Middleware sheds with 503 and a Retry-After hint when the limit is reached.
// A 503 lets client-side load balancing retry once on another instance.
func (l *Limiter) Middleware(h http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		if !l.TryAcquire() {
			w.Header().Set("Retry-After", "1")
			http.Error(w, "concurrency limit reached", http.StatusServiceUnavailable)
			return
		}
		start := time.Now()
		rec := &statusRecorder{ResponseWriter: w, code: http.StatusOK}
		h.ServeHTTP(rec, r)
		l.Release(time.Since(start), rec.code == http.StatusGatewayTimeout)
	})
}

type statusRecorder struct {
	http.ResponseWriter
	code int
}

func (s *statusRecorder) WriteHeader(c int) {
	s.code = c
	s.ResponseWriter.WriteHeader(c)
}
go
package conclimit

import (
	"net/http"
	"net/http/httptest"
	"testing"
	"time"
)

func TestLimitGrowsWhenLatencyIsFlat(t *testing.T) {
	l := New(10, 1, 200)
	for i := 0; i < 20; i++ {
		if !l.TryAcquire() {
			t.Fatal("unexpected shed")
		}
		l.Release(10*time.Millisecond, false)
	}
	if got := l.Limit(); got <= 10 {
		t.Fatalf("limit should grow with flat latency, got %d", got)
	}
}

func TestLimitShrinksWhenQueueBuilds(t *testing.T) {
	l := New(100, 1, 200)
	l.TryAcquire()
	l.Release(10*time.Millisecond, false) // learn minRTT
	before := l.Limit()
	for i := 0; i < 5; i++ {
		l.TryAcquire()
		l.Release(40*time.Millisecond, false) // 4x slower: queueing
	}
	if got := l.Limit(); got >= before {
		t.Fatalf("limit should shrink, before %d after %d", before, got)
	}
}

func TestDropHalvesAndClamps(t *testing.T) {
	l := New(8, 4, 100)
	l.TryAcquire()
	l.Release(time.Millisecond, true)
	if got := l.Limit(); got != 4 {
		t.Fatalf("want 4, got %d", got)
	}
	l.TryAcquire()
	l.Release(time.Millisecond, true)
	if got := l.Limit(); got != 4 {
		t.Fatalf("clamped at Min, got %d", got)
	}
}

func TestMiddlewareShedsWith503(t *testing.T) {
	l := New(1, 1, 1)
	block := make(chan struct{})
	started := make(chan struct{})
	h := l.Middleware(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		close(started)
		<-block
	}))
	go h.ServeHTTP(httptest.NewRecorder(), httptest.NewRequest("GET", "/", nil))
	<-started
	rec := httptest.NewRecorder()
	h.ServeHTTP(rec, httptest.NewRequest("GET", "/", nil))
	close(block)
	if rec.Code != http.StatusServiceUnavailable || rec.Header().Get("Retry-After") != "1" {
		t.Fatalf("want 503 with Retry-After, got %d", rec.Code)
	}
}

Example: steering and fill escalation ​

Rank healthy caches that hold the file: embedded-and-routed first, then peering, then transit, with load as a tiebreak; return several URLs. Fill escalation allows peer, then tier, then origin after configurable waits, inside a window that may wrap midnight.

go
// Package steering is a teaching re-implementation of the idea described in
// Netflix's Open Connect Overview: a control plane in the cloud picks which
// cache appliances (OCAs) a client should stream a file from, using what the
// appliances report (files on disk, health, learned routes). It is NOT
// Netflix code; every weight and field here is an illustrative assumption.
package steering

import (
	"errors"
	"fmt"
	"sort"
)

// Appliance is what one cache reports to the control plane.
type Appliance struct {
	ID       string
	Host     string
	Files    map[string]bool // file IDs stored on disk
	Healthy  bool
	Load     float64 // 0.0 idle .. 1.0 saturated
	Embedded bool    // inside the client's ISP (vs at an exchange point)
	// Prefixes are client prefixes this appliance learned over BGP from the ISP.
	Prefixes map[string]bool
}

// Request is one playback request after authorization and licensing checks.
type Request struct {
	ClientPrefix string // e.g. "198.51.100.0/24"
	FileID       string // one encoded stream (codec, resolution, bitrate)
}

// ErrNoCandidate means no healthy appliance holds the file; the caller falls
// back to a wider tier (in this sketch the caller decides what that is).
var ErrNoCandidate = errors.New("steering: no healthy appliance has the file")

// MaxLoad is the load above which an appliance is skipped.
const MaxLoad = 0.9

// score is lower-is-better: network proximity first, then load.
func score(a Appliance, r Request) float64 {
	s := 0.0
	switch {
	case a.Embedded && a.Prefixes[r.ClientPrefix]:
		s = 0 // inside the client's own ISP and routed to it
	case a.Prefixes[r.ClientPrefix]:
		s = 10 // exchange point that peers with the client's ISP
	default:
		s = 100 // reachable, but over transit
	}
	return s + a.Load*5
}

// Rank returns up to n URLs, best first. Several URLs let the client switch
// servers mid-stream without asking the control plane again.
func Rank(fleet []Appliance, r Request, n int) ([]string, error) {
	type cand struct {
		a Appliance
		s float64
	}
	var cs []cand
	for _, a := range fleet {
		if !a.Healthy || a.Load >= MaxLoad || !a.Files[r.FileID] {
			continue
		}
		cs = append(cs, cand{a, score(a, r)})
	}
	if len(cs) == 0 {
		return nil, ErrNoCandidate
	}
	sort.SliceStable(cs, func(i, j int) bool {
		if cs[i].s != cs[j].s {
			return cs[i].s < cs[j].s
		}
		return cs[i].a.ID < cs[j].a.ID
	})
	if n > len(cs) {
		n = len(cs)
	}
	urls := make([]string, 0, n)
	for _, c := range cs[:n] {
		urls = append(urls, fmt.Sprintf("https://%s/range/%s", c.a.Host, r.FileID))
	}
	return urls, nil
}
go
package steering

import "time"

// FillTier is where an appliance may download a missing file from during its
// fill window. The order (peer, tier, origin) follows the Netflix "Netflix and
// Fill" post; the delays are made-up examples of an escalation policy.
type FillTier int

const (
	PeerFill   FillTier = iota // same manifest cluster or subnet
	TierFill                   // other appliances outside the cluster
	OriginFill                 // the object store behind the fleet (S3)
)

func (t FillTier) String() string {
	return [...]string{"peer", "tier", "origin"}[t]
}

// EscalationPolicy says how long an appliance waits before it may reach
// farther. Fill masters get shorter waits so they fetch first and share.
type EscalationPolicy struct {
	TierAfter   time.Duration
	OriginAfter time.Duration
}

// AllowedTiers returns the tiers an appliance may use after waiting `waited`
// since the file appeared in its manifest.
func AllowedTiers(p EscalationPolicy, waited time.Duration) []FillTier {
	tiers := []FillTier{PeerFill}
	if waited >= p.TierAfter {
		tiers = append(tiers, TierFill)
	}
	if waited >= p.OriginAfter {
		tiers = append(tiers, OriginFill)
	}
	return tiers
}

// InFillWindow reports whether hour-of-day h (0-23, local to the appliance)
// is inside a window that may wrap midnight, e.g. start=2, end=10 or 22..6.
func InFillWindow(h, start, end int) bool {
	if start <= end {
		return h >= start && h < end
	}
	return h >= start || h < end
}
go
package steering

import (
	"errors"
	"reflect"
	"testing"
	"time"
)

func fleet() []Appliance {
	f := map[string]bool{"title42-av1-1080p": true}
	p := map[string]bool{"198.51.100.0/24": true}
	return []Appliance{
		{ID: "ix-1", Host: "ix1.example.net", Files: f, Healthy: true, Load: 0.2, Prefixes: p},
		{ID: "isp-1", Host: "isp1.example.net", Files: f, Healthy: true, Load: 0.5, Embedded: true, Prefixes: p},
		{ID: "isp-2", Host: "isp2.example.net", Files: f, Healthy: false, Embedded: true, Prefixes: p},
		{ID: "isp-3", Host: "isp3.example.net", Files: map[string]bool{}, Healthy: true, Embedded: true, Prefixes: p},
		{ID: "far-1", Host: "far1.example.net", Files: f, Healthy: true, Load: 0.0},
		{ID: "hot-1", Host: "hot1.example.net", Files: f, Healthy: true, Load: 0.95, Embedded: true, Prefixes: p},
	}
}

func TestRankPrefersEmbeddedThenPeeringThenTransit(t *testing.T) {
	got, err := Rank(fleet(), Request{ClientPrefix: "198.51.100.0/24", FileID: "title42-av1-1080p"}, 3)
	if err != nil {
		t.Fatal(err)
	}
	want := []string{
		"https://isp1.example.net/range/title42-av1-1080p",
		"https://ix1.example.net/range/title42-av1-1080p",
		"https://far1.example.net/range/title42-av1-1080p",
	}
	if !reflect.DeepEqual(got, want) {
		t.Fatalf("got %v want %v", got, want)
	}
}

func TestRankNoCandidate(t *testing.T) {
	_, err := Rank(fleet(), Request{ClientPrefix: "198.51.100.0/24", FileID: "missing"}, 2)
	if !errors.Is(err, ErrNoCandidate) {
		t.Fatalf("want ErrNoCandidate, got %v", err)
	}
}

func TestAllowedTiersEscalate(t *testing.T) {
	p := EscalationPolicy{TierAfter: 30 * time.Minute, OriginAfter: 2 * time.Hour}
	cases := []struct {
		waited time.Duration
		want   []FillTier
	}{
		{0, []FillTier{PeerFill}},
		{45 * time.Minute, []FillTier{PeerFill, TierFill}},
		{3 * time.Hour, []FillTier{PeerFill, TierFill, OriginFill}},
	}
	for _, c := range cases {
		if got := AllowedTiers(p, c.waited); !reflect.DeepEqual(got, c.want) {
			t.Errorf("waited %v: got %v want %v", c.waited, got, c.want)
		}
	}
}

func TestInFillWindowWrapsMidnight(t *testing.T) {
	if !InFillWindow(23, 22, 6) || !InFillWindow(3, 22, 6) || InFillWindow(12, 22, 6) {
		t.Fatal("wrapping window wrong")
	}
	if !InFillWindow(2, 2, 10) || InFillWindow(10, 2, 10) {
		t.Fatal("plain window wrong")
	}
}

Example: a per-title ladder ​

From measured trial encodes, keep the frontier and choose rungs until quality stops improving.

go
// Package ladder illustrates per-title encoding as Netflix described it in
// "Per-Title Encode Optimization" (2015): encode a title at several
// resolutions and quality settings, then keep, for each bitrate, the
// resolution that gives the best quality (the upper hull of the curves).
// Quality numbers here are inputs you measured (VMAF or PSNR); this package
// does no video work and is NOT Netflix code.
package ladder

import "sort"

// Point is one trial encode of a title.
type Point struct {
	Height  int     // 480, 720, 1080 ...
	Kbps    int     // resulting bitrate
	Quality float64 // measured quality (e.g. VMAF 0..100)
}

// Rung is one entry of the bitrate ladder sent to clients.
type Rung struct {
	Height int
	Kbps   int
}

// Fixed is the "one-size-fits-all" ladder idea: the same rungs for every
// title, whatever its complexity.
var Fixed = []Rung{{240, 235}, {480, 1050}, {720, 2350}, {1080, 4300}, {1080, 5800}}

// Hull keeps only points not dominated by a cheaper point of higher quality,
// sorted by bitrate. That frontier is where the ladder should live.
func Hull(trials []Point) []Point {
	ps := append([]Point(nil), trials...)
	sort.Slice(ps, func(i, j int) bool {
		if ps[i].Kbps != ps[j].Kbps {
			return ps[i].Kbps < ps[j].Kbps
		}
		return ps[i].Quality > ps[j].Quality
	})
	var out []Point
	best := -1.0
	for _, p := range ps {
		if p.Quality > best {
			out = append(out, p)
			best = p.Quality
		}
	}
	return out
}

// PerTitle picks ladder rungs from the hull: walk up in bitrate and add a
// rung only when quality improves by at least minStep, and stop adding once
// quality reaches ceiling (more bits would not be visible).
func PerTitle(trials []Point, minStep, ceiling float64) []Rung {
	var rungs []Rung
	last := -1.0
	for _, p := range Hull(trials) {
		if last >= ceiling {
			break
		}
		if last < 0 || p.Quality-last >= minStep {
			rungs = append(rungs, Rung{p.Height, p.Kbps})
			last = p.Quality
		}
	}
	return rungs
}
go
package ladder

import (
	"reflect"
	"testing"
)

// An "easy" animated title: 1080p is already excellent at low bitrate.
var cartoon = []Point{
	{480, 600, 80}, {720, 600, 78}, {720, 1200, 90}, {1080, 1200, 88},
	{1080, 2000, 95}, {1080, 3000, 96}, {1080, 5800, 96.5},
}

func TestHullDropsDominatedPoints(t *testing.T) {
	got := Hull(cartoon)
	for _, p := range got {
		if p == (Point{720, 600, 78}) || p == (Point{1080, 1200, 88}) {
			t.Fatalf("dominated point kept: %v", p)
		}
	}
}

func TestPerTitleStopsAtCeiling(t *testing.T) {
	got := PerTitle(cartoon, 3, 95)
	want := []Rung{{480, 600}, {720, 1200}, {1080, 2000}}
	if !reflect.DeepEqual(got, want) {
		t.Fatalf("got %v want %v", got, want)
	}
	// The fixed ladder would spend 5800 kbps on this title.
	if Fixed[len(Fixed)-1].Kbps <= got[len(got)-1].Kbps {
		t.Fatal("per-title top rung should be cheaper than the fixed top rung")
	}
}

The Go angle ​

  • A buffered channel is the simplest fixed semaphore (the "before"); the adaptive limiter needs a mutex because the limit itself changes.
  • httptest makes the shedding testable without a network: one blocked handler holds the only slot, the second request must get 503.
  • In production use a maintained library: Netflix's own implementation is Java (concurrency-limits); in Go, gRPC interceptors or Envoy's adaptive concurrency filter play the same role (inference: products named, not compared on this page).
  • sort.SliceStable with an ID tiebreak keeps steering deterministic, which keeps tests stable and makes cache affinity predictable.

Laravel ​

Example: adaptive limit middleware, registration and steering service ​

The middleware keeps per-host counters in the Redis cache store (Cache::store('redis')->increment() and decrement(), documented in the Laravel 13 cache docs), sheds with 503 and Retry-After, and updates the limit with the same formula. It is registered as a middleware alias in bootstrap/app.php. The steering service runs the ranking query with the query builder against the schema in the SQL below.

php
<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Symfony\Component\HttpFoundation\Response;

/**
 * Teaching version of a gradient concurrency limit (idea from Netflix's
 * "Performance Under Load", 2018). Not Netflix code. Counters live in the
 * Redis cache store and are keyed per host, because the limit protects one
 * instance, not the whole fleet.
 */
class AdaptiveConcurrencyLimit
{
    private const MIN = 4;
    private const MAX = 500;

    public function handle(Request $request, Closure $next): Response
    {
        $store = Cache::store('redis');
        $host = gethostname() ?: 'unknown';
        $inflightKey = "conclimit:{$host}:inflight";
        $limit = (float) $store->get("conclimit:{$host}:limit", 20);

        $inflight = $store->increment($inflightKey);
        if ($inflight > (int) $limit) {
            $store->decrement($inflightKey);

            return response('concurrency limit reached', 503, ['Retry-After' => '1']);
        }

        $start = hrtime(true);
        try {
            $response = $next($request);
        } finally {
            $store->decrement($inflightKey);
        }

        $rttMs = (hrtime(true) - $start) / 1e6;
        $this->adjust($host, $limit, $rttMs, $response->getStatusCode() === 504);

        return $response;
    }

    private function adjust(string $host, float $limit, float $rttMs, bool $dropped): void
    {
        $store = Cache::store('redis');
        if ($dropped) {
            $new = $limit / 2;
        } else {
            $minRtt = (float) $store->get("conclimit:{$host}:minrtt", $rttMs);
            $minRtt = min($minRtt, $rttMs);
            $store->put("conclimit:{$host}:minrtt", $minRtt, now()->addMinutes(10));
            $gradient = max(0.5, min(1.0, $minRtt / max($rttMs, 0.001)));
            $new = $limit * $gradient + sqrt($limit);
        }
        // Last writer wins: acceptable for a hint that converges, not for money.
        $store->put("conclimit:{$host}:limit", max(self::MIN, min(self::MAX, $new)), now()->addHour());
    }
}
php
<?php

// bootstrap/app.php (excerpt): register the middleware alias, then use
// Route::middleware('conclimit') on the routes an instance must protect.

use App\Http\Middleware\AdaptiveConcurrencyLimit;
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;

return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        api: __DIR__.'/../routes/api.php',
        health: '/up',
    )
    ->withMiddleware(function (Middleware $middleware): void {
        $middleware->alias([
            'conclimit' => AdaptiveConcurrencyLimit::class,
        ]);
    })
    ->withExceptions(function (Exceptions $exceptions): void {
        //
    })->create();
php
<?php

namespace App\Services;

use Illuminate\Support\Facades\DB;

/**
 * Picks cache servers for one file, in the spirit of the Open Connect
 * steering service (control plane decides, caches only serve bytes).
 * Schema: see sql/steering.sql. Weights are illustrative, not Netflix's.
 */
class OcaSteering
{
    /** @return list<string> URLs, best first */
    public function urlsFor(string $fileId, string $clientPrefix, int $n = 3): array
    {
        $rows = DB::table('appliances as a')
            ->join('appliance_files as f', 'f.appliance_id', '=', 'a.id')
            ->leftJoin('appliance_routes as r', function ($join) use ($clientPrefix) {
                $join->on('r.appliance_id', '=', 'a.id')
                    ->where('r.client_prefix', '=', $clientPrefix);
            })
            ->where('f.file_id', $fileId)
            ->where('a.healthy', true)
            ->where('a.load', '<', 0.9)
            ->selectRaw(
                'a.host, CASE WHEN a.embedded AND r.appliance_id IS NOT NULL THEN 0 '
                .'WHEN r.appliance_id IS NOT NULL THEN 10 ELSE 100 END + a.load * 5 AS score'
            )
            ->orderBy('score')
            ->orderBy('a.host')
            ->limit($n)
            ->get();

        return $rows->map(fn ($row) => "https://{$row->host}/range/{$fileId}")->all();
    }
}

The SQL behind steering ​

sql
-- Illustrative control-plane tables for steering (PostgreSQL syntax).
-- Caches report health, load, learned routes and stored files; the
-- control plane joins them per playback request. Not Netflix's schema.
CREATE TABLE appliances (
    id        bigserial PRIMARY KEY,
    host      text    NOT NULL UNIQUE,
    embedded  boolean NOT NULL,          -- inside an ISP vs at an IXP
    healthy   boolean NOT NULL DEFAULT true,
    load      real    NOT NULL DEFAULT 0, -- 0..1, from the last report
    reported_at timestamptz NOT NULL DEFAULT now()
);

CREATE TABLE appliance_routes (           -- prefixes learned over BGP
    appliance_id  bigint NOT NULL REFERENCES appliances(id),
    client_prefix cidr   NOT NULL,
    PRIMARY KEY (appliance_id, client_prefix)
);

CREATE TABLE appliance_files (            -- what is on disk right now
    appliance_id bigint NOT NULL REFERENCES appliances(id),
    file_id      text   NOT NULL,         -- one encoded stream
    PRIMARY KEY (appliance_id, file_id)
);
CREATE INDEX appliance_files_by_file ON appliance_files (file_id);

-- Steering query: healthy caches that hold the file, nearest network first.
SELECT a.host,
       CASE WHEN a.embedded AND r.appliance_id IS NOT NULL THEN 0
            WHEN r.appliance_id IS NOT NULL THEN 10
            ELSE 100 END + a.load * 5 AS score
FROM appliances a
JOIN appliance_files f ON f.appliance_id = a.id AND f.file_id = 'title42-av1-1080p'
LEFT JOIN appliance_routes r ON r.appliance_id = a.id
                             AND r.client_prefix = '198.51.100.0/24'
WHERE a.healthy AND a.load < 0.9
ORDER BY score, a.host
LIMIT 3;
sql
-- Which appliances are missing a title they should hold (fill delta)?
SELECT a.host
FROM appliances a
WHERE a.embedded
  AND NOT EXISTS (SELECT 1 FROM appliance_files f
                  WHERE f.appliance_id = a.id AND f.file_id = 'title42-av1-1080p');

The Laravel angle ​

  • PHP-FPM handles one request per worker, so the real concurrency ceiling is pm.max_children; the middleware adds an adaptive limit below it so that slow dependencies cause fast 503s instead of a queue of busy workers (inference).
  • The limit update is last-writer-wins in the cache; fine for a converging hint, wrong for money. Atomic locks (Cache::lock) exist but would serialise every request.
  • Under Laravel Octane one worker serves many requests in a long-lived process, so an in-memory counter per worker becomes possible; the cache-based version works in both.
  • Laravel's HTTP client retries (Http::retry()) should retry a 503 once on another instance, not hammer the same one: that is the client half of the 2018 design.

Solving the classic problems ​

A new title must play everywhere at launch ​

SolutionHowAdvantageCost
Pull CDN, fill on missFirst viewers trigger origin fetchesNo planningLaunch-hour storm on origin and transit
Proactive fill (Netflix)Fill windows, masters, tiers, liveness checkPeak used only for servingNeeds popularity prediction and a control plane
Fast track fill (Netflix)Out-of-cycle fillUrgent fixesUses bandwidth off schedule

A region breaks ​

SolutionHowAdvantageCost
Active-passiveStandby regionSimple data storyCold standby rarely works when needed (inference)
Active-active (Netflix 2013)Stateless services, async data, DNS + ZuulBoth regions proven dailyAsync replication anomalies
Dark capacity (Netflix 2018)Shadow ASGs, flip DNS8-minute evacuationPaying for idle instances

Overload and retry storms ​

SolutionHowAdvantageCost
Static RPS limitsToken bucket from stress testEasyStale after the next change
Hystrix pools + circuitsPer-dependency isolation, fallbackContains slow dependenciesStatic tuning, thread overhead
Adaptive concurrency limitsGradient/Vegas per server, shed fastSelf-tuning, protects callersUncoordinated: one server may shed while another has room

Encoding is slow and fragile ​

SolutionHowAdvantageCost
One job per titleEncode start to endSimpleDays; late failure restarts
Chunked parallel (2015)Chunks on spot capacity, verify eachHours; small retriesAssembly and boundary validation
Per-shot with checkpoints (2018)Collate shots, checkpoint eachBetter quality per bit, cheaper retries2+ orders of magnitude more units

One API layer slows every team ​

SolutionHowAdvantageCost
Central aggregation teamOne team builds every endpointConsistencyBottleneck
BFF per deviceUI teams own their endpointsSpeed per deviceDuplicated fetching code
GraphQL federationDGS per domain, registry, gatewayOwned pieces, one graphComposition rules, gateway ops

A deploy silently breaks a metric ​

SolutionHowAdvantageCost
Manual canary watchEngineer watches dashboardsCheapMisses small regressions
Kayenta ACABaseline vs canary statisticsRepeatable, objectiveMetric selection, extra clusters

Caches disagree across regions ​

SolutionHowAdvantageCost
Short TTLsExpire quicklySimpleLower hit ratio
Multi-master cache replicationReplicate cache writesWarm everywhereComplex
Remote invalidation (Netflix)EVCache sends SQS message, other region deletesSimple, correct-ishNext read misses

What you can copy ​

Each Netflix subsystem mapped to the generic technique that a normal team can use, and the chapter that teaches it. The "copy when" column is this page's judgement (inference).

Netflix subsystemGeneric techniqueCopy whenChapter
Open ConnectCDN with tiered cache, pre-warmingLarge static or video bytes dominate egressCDN
Proactive fillPush CDN, scheduled pre-populationYou can predict demand (releases, catalogue)CDN
SteeringControl plane returns ranked endpointsClients can be given URLsLoad Balancing
Chunked encodingSplit, parallel, checkpoint, verifyLong batch jobs on preemptible capacityWrite buffering & batching
Per-title encodingMeasure, then pick per itemItem cost varies widelyObject storage
ZuulAPI gateway with filtersMany clients, many backendsAPI Gateway
Device APIs, DGSBFF, then GraphQL federationMany UI teams, many domain teamsGraphQL
HystrixTimeouts, bulkheads, circuit breakersAny remote callCircuit Breaker
Concurrency limitsAdaptive load sheddingAutoscaled services with changing latencyLoad Shedding
Chaos Monkey, ChAPFault injection with control groupsRedundancy exists and must be provenChaos Engineering
Active-active, NimbleMulti-region, warm standbyRegional RTO in minutes is a business needCapacity Planning & DR
CassandraLeaderless wide-column, async multi-DCHuge write volume, key-based accessCassandra
EVCacheReplicated cache per zoneCache loss would overload the databaseCaching
KeystoneEvent bus + stream processingMany producers, many consumers of eventsKafka
Eureka/RibbonClient-side discoveryMostly replaced by DNS/mesh todayService Discovery
TitusContainer platformUse a managed Kubernetes insteadContainers & Kubernetes
Spinnaker, KayentaCD pipelines, automated canary analysisFrequent deploys to productionStrangler Fig
A/B platformExperimentation with allocation and cellsProduct decisions need evidenceML Systems
Atlas, Mantis, tracingMetrics, streaming telemetry, sampled tracesAlways, scaled to sizeObservability

Choosing ​

SituationRecommendationExtra techniqueReason
Startup with a video featureCommercial CDN + HLS/DASH packagingSigned URLsOwn CDN only pays at ISP-scale traffic (inference)
Video is your main egress, many ISPsTalk to a CDN about embedded caches or peeringPre-warm releasesNetflix's reason for Open Connect
Service sometimes melts under burstsAdaptive concurrency limit at the serverOne retry on another instancePerformance Under Load (2018)
Many remote calls, JavaResilience4j, not HystrixTimeouts firstHystrix README
Many UI clientsBFF per client familyShared libraries2012 API redesign
Many domain teams, one graphGraphQL federationSchema registry checks in CI2020 federation post
One region today, RTO in minutes neededSecond region warm, stateless servicesAsync data, DNS switch drillsActive-active, Nimble
Frequent deploysPipelines with canary analysisFresh baseline clusterKayenta (2018)
Want chaos engineeringStart with instance kills in business hoursThen request-level experiments with controlSimian Army, ChAP

In architecture: from a single process to a distributed system ​

Monolith: one process, one database ​

Netflix began as one: the 2016 post says "we migrated from a monolithic app to hundreds of micro-services, and denormalized and our data model, using NoSQL databases." A monolith can still use the transferable ideas: per-title thinking (an image service picks quality per image), a concurrency limit in front of the database pool, a CDN for video files, A/B flags in one table. Example: a Laravel app serving course videos from a commercial CDN with HLS renditions, and the adaptive limit middleware on the API routes.

Modular monolith: boundaries without the network ​

The control/data plane split is a boundary that works inside one deployable too: a "playback" module decides (authorise, choose files, sign URLs), a "delivery" module only serves or redirects bytes. Keep the playback module's tables (licences, renditions) separate from the catalogue module so that it could be extracted later (inference).

Microservices: every arrow is a decision ​

Netflix's flow: device to Zuul (filters, shedding) to API layer (device APIs or federated GraphQL gateway) to domain services found through discovery, each protected by limits and fallbacks, emitting events to Keystone. A playback request crosses Zuul, playback services, steering and licence services; browse crosses the GraphQL gateway and several DGSs. The hard-won rules from the sources: no cross-region calls on the user path, every call has a timeout and a fallback or a fast rejection, and every service is a chaos target.

device -> Zuul -> playback API -> {licence, steering, A/B server}
                                      steering -> cache-state store (EVCache, inference)
       -> OCA (bytes)   events -> Keystone (Kafka) -> Flink / Iceberg tables

Distributed data: replicas, caches, regions ​

Cassandra replicates asynchronously between regions; EVCache keeps a copy per zone and invalidates across regions via SQS; Keystone is at-least-once, so consumers must deduplicate. The consequences are the classic ones: a user moved between regions may briefly read older data, a cache may serve a value that was just changed in the other region until the invalidation arrives, and analytics may count an event twice unless deduplicated. Netflix's answers are measurement (the 500 ms replication test), design (stateless services, regional isolation) and tolerance in the product. Models in Consistency Models and CAP & PACELC.

Scaling path: 1x, 10x, 100x ​

ScaleVideo deliveryControl planeResilience
1x (one country, small)Commercial CDN, per-title ladders from a toolMonolith or few services in one regionTimeouts, retries, backups
10xMulti-CDN, pre-warming launchesGateway, BFFs, cache tier, event busConcurrency limits, canaries, instance chaos
100x (Netflix)Own appliances in ISPs, proactive fill, steeringFederated graph, containers, many regionsActive-active, dark capacity, ChAP

Lab: run the mechanisms ​

The Go tests below were run on the author's machine (Go 1.27, darwin/arm64); the SQL and Laravel steps are expected, not run.

  1. Run the tests.
$ cd docs/snippets/system-design/case-study-netflix/go
$ go test ./...
ok   academy/case-study-netflix/conclimit  0.058s
?    academy/case-study-netflix/fixedlimit [no test files]
ok   academy/case-study-netflix/ladder     0.044s
ok   academy/case-study-netflix/steering   0.044s
  1. Watch the limit move (expected, not run): write a tiny main that calls TryAcquire/Release with 10 ms samples twenty times, then 40 ms samples. Expected: the limit climbs from 10 to well above 20, then falls back towards half of its peak plus the square-root queue.

  2. Steering in SQL (expected, not run): load sql/steering.sql into PostgreSQL with three appliances (embedded+routed, IXP+routed, far) holding title42-av1-1080p, with loads 0.5, 0.2 and 0.0.

 host             | score
------------------+-------
 isp1.example.net |   2.5
 ix1.example.net  |  11.0
 far1.example.net |   100
  1. Mark isp1 unhealthy (UPDATE appliances SET healthy = false WHERE host = 'isp1.example.net';) and rerun: expected ix1 first. This is the idea in the Appliances page: "Health and system load information feedback is automatically incorporated into Netflix content routing decisions."

  2. Laravel (expected, not run): put ->middleware('conclimit') on an API route, point it at a handler that sleeps 200 ms, and run hey -c 100 -n 2000. Expected: a mix of 200 and 503 with Retry-After: 1, and p99 latency of the 200s staying near 200 ms instead of growing with the queue.

Common misconceptions ​

BeliefReality (source)
Netflix streams video from AWSOpen Connect delivers video; AWS runs the application (Cloud Migration, 2016)
Open Connect caches on demand like any CDNProactive caching in fill windows (Netflix and Fill, 2016)
OCAs check who may watchNo DRM info or member data on OCAs; checks happen in AWS (Overview)
Netflix still develops HystrixMaintenance mode since 1.5.18 (README)
Zuul 2 made everything fasterMain gain was connection scaling; results differed from hopes (2016)
GraphQL federation covers all of NetflixDeployed for studio, explored elsewhere (2020)
Chaos Monkey runs unwatched at nightBusiness hours, monitored, engineers standing by (2011)
Multi-region means synchronous replicationAsync replication, stateless services, in-region access (2013)
Failover is DNS onlyDNS plus Zuul proxying plus capacity; dark capacity made it 8 min (2018)
Spring Cloud Netflix is Netflix's stackCommunity project; Netflix adopted Spring Boot in 2018
Per-title encoding means higher bitratesOften lower: bits only where quality improves (2015)
Canaries are compared with productionWith a fresh baseline cluster (Kayenta, 2018)

Cheat sheet ​

TopicRemember
SplitControl plane in AWS, data plane in Open Connect
OCAStores and serves files, reports health/routes/files, nothing else
PlacementEmbedded in ISPs (free hardware) or at IXPs (SFI peering)
FillOff-peak windows; masters from S3; tier then peer; liveness threshold
SteeringAWS ranks OCAs by file availability, health, proximity; returns URLs
EncodingChunked and parallel (2015), per-title (2015), per-shot with VMAF (2018)
CodecsAVC, HEVC, VP9, AV1 (+20% over VP9, 2020)
EdgeZuul filters inbound/endpoint/outbound; Netty in Zuul 2
APIOSFA REST, then device APIs (2012), then DGS federation (2020)
OverloadHystrix retired; adaptive concurrency limits with gradient formula
ChaosChaos Monkey (instances), Chaos Kong (regions), FIT, ChAP (controlled)
RegionsActive-active, async data, Nimble 8-minute evacuation with dark capacity
DataCassandra LOCAL_QUORUM, EVCache per zone + SQS invalidation, Keystone Kafka/Flink, Iceberg
DeliverySpinnaker pipelines, Kayenta baseline-vs-canary
Rule of this pageName the Netflix source and year, or write inference

Self-check: questions & answers ​

Show:
  • Must-know asked in almost every interview
  • Important frequent; expected at senior level
  • Good to know extra depth that sets you apart

1 — Why does an OCA not need to know about other OCAs? Important ​

Answer

Answer: The AWS control plane aggregates popularity, placement and health and hands each OCA a manifest and ranked fill sources (Netflix and Fill, 2016). The cache only stores, serves and reports.

2 — What two deployment types does Open Connect use and who provides what in the embedded one? Important ​

Answer

Answer: OCAs at internet exchanges via settlement-free peering, and OCAs embedded in ISPs; Netflix provides the hardware, the ISP provides power, space and connectivity (Overview).

3 — Why fill during off-peak windows rather than on demand? Must-know ​

Answer

Answer: Netflix can predict what and when members will watch, so it uses non-peak bandwidth and avoids disk read/write contention during serving (Netflix and Fill, 2016; Overview).

4 — What problem did per-title encoding solve that the fixed ladder had? Important ​

Answer

Answer: A fixed ladder wastes bits on simple content and starves complex content; per-title analysis picks resolutions and bitrates per title's complexity (Per-Title, 2015).

5 — Why did per-shot encoding need "collation" and "checkpoints"? Good to know ​

Answer

Answer: Going from about 20 chunks to about 900 shots per hour overloaded messaging between instances; collating shots into ~3-minute chunks kept message counts manageable, and checkpoints avoid re-encoding finished shots when an instance is lost (2018).

6 — What are Zuul 2's three filter types? Important ​

Answer

Answer: Inbound (before proxying: auth, routing), endpoint (static response or proxy to origin), outbound (after the response: gzip, metrics, headers) (Open Sourcing Zuul 2, 2018).

7 — In GraphQL federation, what does the Schema Registry do and what does the gateway do? Important ​

Answer

Answer: The registry stores, validates and composes DGS schemas into the unified schema; the gateway turns client queries into query plans and calls the owning DGSs (2020).

8 — Write the gradient limit update and say why the queue term is the square root. Good to know ​

Answer

Answer: gradient = RTTnoload / RTTactual; newLimit = limit * gradient + queueSize with queueSize defaulting to sqrt(limit): large relative to small limits (fast growth) and small relative to large limits (stability) (2018).

9 — What made Nimble's 8-minute evacuation possible? Good to know ​

Answer

Answer: Dark capacity: shadow ASGs with instances already started but unregistered and silent, activated at failover, so the failover becomes mostly a DNS flip (2018).

10 — How does EVCache stay correct across two active regions? Important ​

Answer

Answer: Writes trigger an SQS message to the other region, whose client invalidates the key; the next read misses and reloads (Active-Active, 2013).

11 — Why does Kayenta create a new baseline cluster? Important ​

Answer

Answer: Comparing a new canary with a long-running production cluster can be unreliable because of effects of long-running processes; a fresh baseline removes them (2018).

12 — Which claims on this page are inference? Must-know ​

Answer

Answer: The scope list, the back-of-envelope estimate, the DRM licence flow details, client server switching, the copy-when judgements, and cost/latency illustrations: each is marked inference.

Glossary ​

TermMeaning
NetflixStreaming company whose published engineering posts are the sources of this page
Control planeThe part that holds state and decides (here: AWS services)
Data planeThe part that executes and serves bytes (here: Open Connect)
AWSAmazon Web Services, where Netflix runs everything except video delivery
Open ConnectNetflix's own CDN program and network
OCAOpen Connect Appliance: Netflix-built cache server
ISP cacheA cache placed inside an internet service provider's network (an embedded OCA)
IXPInternet exchange point where networks interconnect
SFISettlement-free interconnection: peering without payment
BGPRouting protocol; OCAs learn client routes from ISP routers
Fill windowOff-peak time when OCAs download new content
Fill masterOCA elected to fetch a title first and share it
Peer fill / tier fillDownload from a nearby OCA in the same cluster / from OCAs outside it
Manifest clusterOCAs sharing content region, popularity feed and copy count
SteeringChoosing which OCAs serve a client, returned as URLs
DRMDigital rights management: encryption plus licences per device
Encoding pipelineIngest, inspect, encode, assemble, validate, package
Chunked encodingSplitting a source into chunks encoded in parallel
Per-title encodingA bitrate ladder chosen per title from its complexity
Per-shot encodingEncoding parameters chosen per shot (Dynamic Optimizer)
Dynamic OptimizerNetflix's shot-based encode optimisation framework
VMAFNetflix's perceptual video quality metric
Bitrate ladderThe set of resolution and bitrate pairs offered for a title
IMFInteroperable Master Format, Netflix's preferred source format
AV1Royalty-free codec from AOMedia; 20% better than Netflix's VP9 encodes
VP9Google codec used in Netflix mobile encodes
HEVCH.265 codec, among Netflix codec profiles
Adaptive bitrateClient switching between renditions as bandwidth changes
ManifestList of renditions and their URLs given to a player (generic HLS/DASH sense)
CosmosNetflix media platform of workflow-driven microservices (2021)
ZuulNetflix L7 gateway with filters; Zuul 2 runs on Netty
API gatewaySingle entry point that routes and protects backend calls
NettyAsynchronous event-driven network framework used by Zuul 2
IsthmusZuul mode that proxies mis-routed requests to the correct region
BFFBackend for frontend: an API shaped for one client type
GraphQL federationOne graph composed from schemas owned by many services
DGSDomain Graph Service and Netflix's Spring Boot framework for it
Schema RegistryStores, validates and composes federated schemas
Studio APINetflix's earlier curated GraphQL graph for studio data
HystrixNetflix fault-tolerance library, now in maintenance mode
Resilience4jLibrary Netflix recommends for new projects instead of Hystrix
Concurrency limitsCaps on in-flight requests; Netflix's are adaptive
Little's lawConcurrency = arrival rate x time in system
GradientRTTnoload / RTTactual in Netflix's limiter
Vegas, AIMDTCP-inspired limit algorithms in concurrency-limits
Chaos MonkeyTool that kills production instances or containers at random
Chaos KongNetflix tool for region-failure exercises
Latency MonkeySimian Army tool injecting delays
FITFailure Injection Testing for microservice-level faults
ChAPChaos Automation Platform with control and experiment clusters
Active-activeSeveral regions serving users at the same time
Multi-regionDeployment across several cloud regions
Regional failoverMoving traffic away from an unhealthy region
EvacuationNetflix term for draining a region of user traffic
Nimble2018 project for 8-minute evacuation with dark capacity
Shadow ASGHidden autoscaling group of ready but unregistered instances
UltraDNS, Route 53DNS providers Netflix layered for directional routing and fast switches
CassandraLeaderless wide-column database used for user data
CL_LOCAL_QUORUMCassandra consistency: majority of replicas in the local data centre
EVCacheNetflix's replicated memcached-based cache
memcachedIn-memory key-value cache server under EVCache
KetamaConsistent hashing scheme used to shard EVCache
SQSAWS queue used for EVCache cross-region invalidation
KeystoneNetflix data pipeline and stream processing platform
KafkaLog-based message broker under Keystone
FlinkStream processor behind Keystone SPaaS
ChukwaEarlier log collector of Netflix's first data pipeline
IcebergTable format created at Netflix, now Apache Iceberg
EurekaNetflix service registry for discovery
RibbonNetflix client-side load balancing library, in maintenance
Service discoveryFinding live instances of a service
Spring BootJava framework Netflix adopted as core in 2018
ArchaiusNetflix configuration library
TitusNetflix container platform on Mesos and EC2
ContainersPackaged processes scheduled by a platform such as Titus
MesosCluster manager underneath Titus
SpinnakerNetflix multi-cloud continuous delivery platform
Continuous deliveryEvery change goes through an automated pipeline to production
AsgardNetflix deployment tool replaced by Spinnaker
Red-blackNetflix name for blue-green deployment
Canary analysisComparing a new version on a small slice with a baseline
KayentaAutomated canary analysis platform (Netflix and Google)
PersonalisationTailoring rows, ranking and artwork to each member
RecommendationModel output that predicts what a member will enjoy
Netflix Prize2006 competition on rating prediction
A/B testExperiment comparing a control cell with treatment cells
CellNetflix term for a group in an A/B test
AtlasNetflix dimensional time-series metrics platform
MantisNetflix stream platform for operational, real-time applications
TracingFollowing one request across services by propagated context
B3, ZipkinHeader format and tracing system Netflix adopted
Tail samplingDeciding to keep a trace after seeing all its spans
EdgarNetflix troubleshooting tool for streaming sessions
InferenceThis page's own reasoning, not stated in a Netflix source

References ​

Netflix Tech Blog pages return HTTP 403 to automated clients (a browser challenge), so each blog post is linked through its Internet Archive snapshot, which returns 200; the canonical URL is inside the snapshot link.

Built by Morteza Negahi