DEEP DIVE

How Netflix-Scale DRM Actually Works — The DevOps Behind License Servers, CENC & 200M Concurrent Streams

By Akshay Ghalme·April 12, 2026·18 min read

When you tap play on Netflix, a chain of events fires across three different DRM systems, a globally distributed license-server fleet, an ISP-hosted CDN you have never heard of, and a Trusted Execution Environment on your device that even your operating system cannot see into — all before the first frame reaches your screen. The magic is not the encryption. The magic is the DevOps that makes one encrypted file playable on a Samsung TV, an iPhone, a Chromebook, and a PlayStation without ever re-encoding it, while enforcing your 4-screen plan across the entire planet in real time.

Most explanations of DRM stop at "the video is encrypted with AES and the player gets a key." That is the easy 10% of the problem. The hard 90% is operational: how do you serve licenses to millions of concurrent viewers with sub-100ms latency, globally? How do you enforce concurrent-stream limits without a central database becoming a bottleneck? How do you rotate keys on a live stream without interrupting playback? How do you prove to a movie studio that your architecture is secure enough to get the 4K license in the first place?

This post walks through the full stack — from the moment you hit play to the moment decrypted pixels reach your GPU — grounded entirely in publicly documented specs like MPEG-CENC (ISO/IEC 23001-7), MPEG-DASH (ISO/IEC 23009-1), the W3C Encrypted Media Extensions standard, Google's Widevine documentation, Microsoft's PlayReady documentation, and Netflix's published Open Connect papers. Nothing here is insider speculation. It is all public if you know where to look.

The Core Problem Netflix Had to Solve

Netflix has a single catalog of movies and shows. It has to deliver that catalog to:

  • Chrome, Firefox, and Edge on desktop (Widevine DRM)
  • Safari on macOS and iOS (FairPlay Streaming DRM)
  • Windows, Xbox, and older smart TVs (PlayReady DRM)
  • Android phones, tablets, and Android TV (Widevine)
  • Apple TV and tvOS (FairPlay)
  • Roku, Fire TV, smart TVs, game consoles — every one of them speaking one of these three DRMs

Three different DRM systems. Dozens of device classes. Petabytes of video. The naive approach is to encode the entire catalog three times — once per DRM. That is a storage and operational nightmare. Netflix does not do that. Nobody serious does that anymore. The answer is a standard called Common Encryption.

Common Encryption (CENC) — The Trick That Makes Everything Possible

Common Encryption, standardized as ISO/IEC 23001-7 and known as CENC, is the single most important piece of plumbing in modern streaming DRM. It defines a way to encrypt a video file once in a format that every major DRM system can decrypt — as long as that DRM system can deliver the content key to the player.

CENC specifies two encryption schemes:

SchemeCipherUsed by
cencAES-128 in CTR modeWidevine, PlayReady (standard)
cbcsAES-128 in CBC mode with pattern encryptionApple FairPlay, modern Widevine, modern PlayReady

The encryption itself is boring. What is clever is what gets encrypted. CENC does not encrypt the entire MP4 file — it only encrypts the mdat (media data) boxes that contain the actual compressed video and audio samples. The container structure, the moov metadata, the codec init data, the subtitles — all of that stays in the clear. This is why a CENC-encrypted file still looks like a valid MP4 to any parser; you just cannot decode the video samples without the key.

Even within the sample data, CENC supports subsample encryption: for each video frame, some bytes are encrypted and some are not. Typically the NAL unit headers and slice headers (needed for the decoder to parse the stream structure) are left in clear, and only the entropy-coded payload is encrypted. This lets the decoder do its parsing without the key, and only needs the key at the final decrypt step. It also means the player can do things like seek, measure bitrate, and pre-buffer without a license in hand — it only needs the license when it is about to actually render pixels.

The PSSH Box — How the Player Knows Which DRM to Use

A CENC-encrypted file can be decrypted by any DRM system, but the player needs to know which one to ask for the key. This is the job of the PSSH box — "Protection System Specific Header" — defined in the MP4 container format.

A CENC file contains one PSSH box per DRM system it supports. Each PSSH box starts with a 16-byte system ID that identifies which DRM it belongs to. These IDs are fixed constants:

Widevine     : edef8ba9-79d6-4ace-a3c8-27dcd51d21ed
PlayReady    : 9a04f079-9840-4286-ab92-e65be0885f95
FairPlay     : 94ce86fb-07ff-4f43-adb8-93d2fa968ca2

After the system ID, the PSSH box contains DRM-specific data — usually a "license request blob" that the player will forward verbatim to the license server. For Widevine this is a protobuf; for PlayReady it is XML; for FairPlay it is a binary structure. The player does not need to understand the contents — it just passes them through the browser's Encrypted Media Extensions (EME) API to the Content Decryption Module (CDM), which is the DRM-specific software or hardware component that speaks to the license server.

So a single MP4 file can be simultaneously addressable by all three DRMs. When Widevine asks "is there a PSSH for me?" the player finds the one with the Widevine system ID and hands it over. When FairPlay asks, it gets the FairPlay one. One file, three decryption paths.

The DASH Manifest — Telling the Player What Exists

Before the player can request anything, it needs to know what video qualities are available, where the segments live, and which DRMs the content supports. This information is in the DASH manifest (or HLS playlist for Apple devices). A simplified DASH manifest looks like this:

<MPD xmlns="urn:mpeg:dash:schema:mpd:2011">
  <Period>
    <AdaptationSet mimeType="video/mp4" codecs="avc1.64001f">

      <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011"
                         value="cenc"
                         cenc:default_KID="a7d5a8f5-..."/>

      <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
        <cenc:pssh>AAAAWnBzc2gAAAAA7e+LqXn...</cenc:pssh>
      </ContentProtection>

      <ContentProtection schemeIdUri="urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95">
        <cenc:pssh>AAAC1nBzc2gAAAAA...</cenc:pssh>
      </ContentProtection>

      <Representation id="1080p" bandwidth="5000000" width="1920" height="1080">
        <BaseURL>video_1080p.mp4</BaseURL>
        <SegmentBase indexRange="0-4000"/>
      </Representation>

    </AdaptationSet>
  </Period>
</MPD>

Three things to notice:

  1. The default_KID is a key identifier — it tells the license server which content key to deliver. Importantly, the key itself is not here. The KID is just a pointer.
  2. Each ContentProtection element has the system ID of a DRM, and the base64-encoded PSSH for that DRM.
  3. The manifest is not encrypted. Anyone can download it and see which DRMs are supported and where the segments live. This is fine — without the content key, the segments are useless.

The Full End-to-End Flow From Play Button to Pixels

Here is what actually happens when you tap play on a Netflix title. I will walk through it step by step.

Step 1 — App authentication

Before any video is touched, the Netflix app authenticates you. This is a normal OAuth-style flow: the app sends your session token to Netflix's API gateway, gets back a short-lived authorization token, and now has proof that you are a logged-in subscriber. This token is what the license server will later check to enforce plan limits and geographic licensing.

Step 2 — Manifest request

The app requests the DASH manifest (or HLS playlist on Apple devices) for the title. The manifest request includes device capability hints — codec support, screen resolution, HDR capability, DRM security level. The Netflix backend picks a manifest tailored to the device. A device that supports Widevine L1 and HDCP 2.2 gets a manifest with 4K HDR representations. A rooted Android device without L1 gets a manifest capped at 480p. This is enforced server-side because the manifest itself decides what exists for you.

Step 3 — Segment pre-fetching begins

The player immediately starts fetching encrypted video and audio segments from the CDN — Netflix Open Connect (more on this later). Because CENC encrypts only the sample data and not the container structure, the player can parse the segments, build its buffer, and calculate bitrates without a license. Nothing can be rendered yet, but network transfer and demuxing proceed in parallel with the license exchange.

Step 4 — The player asks the CDM for a license

When the player is ready to render, it hands the PSSH data to the browser's EME API, which forwards it to the Content Decryption Module — Widevine CDM on Chrome/Android, PlayReady CDM on Edge/Xbox, FairPlay CDM on Safari/iOS. The CDM constructs a license request, which is a binary blob containing:

  • The KID from the PSSH (what key am I asking for?)
  • A device-bound identity certificate (proof of which device is asking)
  • A session-specific nonce (so the request cannot be replayed)
  • Device attestation data (proof of the DRM security level — L1, L2, or L3 for Widevine)

The player receives this license request from the CDM and POSTs it to the Netflix license server URL (which was also specified in the manifest).

Step 5 — The license server authorizes and responds

This is where Netflix's real business logic lives. The license server receives the request, extracts the device attestation, and cross-references it with:

  • Your account — is this request from a logged-in subscriber?
  • Your plan — does it allow the quality this device is requesting?
  • Geographic licensing — is this title available in your country?
  • Concurrent stream count — are you under your simultaneous stream limit?
  • Device security level — does this device meet the minimum bar the studio contract requires for this quality?
  • Offline vs online — is this a streaming license or a downloadable license with an expiration?

If every check passes, the license server fetches the content key from a secure key store (backed by an HSM or cloud KMS), wraps it with the device's public key from the attestation, and returns a license response. The wrapped key is now only decryptable inside the CDM on the specific device that requested it. Even if an attacker captures the license response in transit, they cannot extract the key without the device's hardware-bound private key.

Step 6 — The CDM decrypts and feeds the decoder

The CDM unwraps the license, extracts the content key into its secure memory, and starts decrypting media samples. Here is the part most people get wrong: on Widevine L1 devices, the decrypted samples never leave the Trusted Execution Environment. The CPU running your browser cannot read them. The decoder runs inside the TEE, the GPU reads from a secure memory region, and the rendered pixels go directly to the display controller. Your operating system cannot screenshot them. This is why screen recording a Netflix stream results in a black rectangle on properly protected devices.

Step 7 — Playback continues with heartbeats

Once playback starts, the player periodically sends heartbeat pings to Netflix to keep the concurrent-stream session alive. If the heartbeat stops (you close the app, crash, or network drops), the session is freed within seconds, and another device can take the slot. This is how concurrent-stream enforcement feels instant from the user's perspective.

License Server Architecture — The Real DevOps Challenge

Here is the part that makes this a DevOps topic and not a cryptography topic. The license server is stateless from a request perspective (each request carries everything it needs), but it must:

  • Respond in well under 100ms at the P99, or playback start stalls and users churn
  • Be globally distributed, so a viewer in Tokyo is not waiting on a license server in Virginia
  • Maintain consistent concurrent-session state across regions, so you cannot bypass your plan by opening the app in two countries at once
  • Be highly available — if it is down, nothing new can start playing, anywhere in the world
  • Protect the master content keys at rest with hardware-backed encryption
  • Log every license decision for audit — studios require proof that DRM is actually being enforced

The architecture that solves this, in the abstract, looks like:

  1. Global edge fleet — license servers deployed in every region a streaming service operates. The player is given a geographically-nearest URL so latency stays tight.
  2. Stateless request path — each license request is validated independently. The request carries the device attestation, session token, and content reference. No server-side session sticking.
  3. Content key store backed by HSM or KMS — the master keys for every title live in a key management service (hardware security modules in a traditional stack, cloud KMS like AWS KMS in a modern cloud stack). The license server has short-lived credentials to decrypt keys, never the master keys themselves.
  4. Distributed session store for concurrent-stream enforcement — this is the one piece of genuinely stateful infrastructure. It needs low-latency reads and writes from every region. Typically built on a globally-replicated key-value store with TTL-based session entries (so ended sessions automatically clean up).
  5. Async audit log pipeline — every license decision, allow or deny, flows into a stream processor (Kafka, Kinesis) and ultimately into a data lake. Studios audit this data to verify contracts are being honored.
  6. Circuit breakers and fallback paths — if the key store hiccups, the license server must fail closed (deny the request) rather than fail open (grant unlicensed access). A flaky DRM system is better than a broken one from a studio's perspective.

The hardest subsystem in this list is the concurrent-session store. It is stateful, global, and hot — every license request reads and potentially updates it, and it must be strongly consistent enough that you cannot game it with a race condition. This is why mature streaming services invest serious engineering in their session layer.

Concurrent Stream Enforcement — A Distributed Systems Problem Pretending to Be a Business Feature

Netflix's "up to 4 simultaneous streams" is not a frontend feature. It is distributed consensus wearing a friendly UI. Here is the actual problem:

You are on a plane in Delhi. Your kid in Mumbai just started an episode. Your spouse in Bangalore turned on the TV. Someone guessed your password and just logged in from São Paulo. All four streams are legitimate according to your plan. A fifth request arrives — from your laptop at the airport lounge — and must be rejected.

Solving this requires a global view of active sessions, updated in real time, with every license request gated on that view. The naive solution is a central database — but that becomes a global bottleneck with unacceptable latency for viewers far from the primary region.

The real architecture uses session tokens with short TTLs. When a license is granted, a session entry is written with a TTL of a few minutes. The player must renew that TTL by heartbeating to the license server during playback. If the heartbeat stops, the TTL expires and the session is gone automatically — no explicit cleanup needed. This turns "am I still streaming?" from a query problem into a TTL problem, which is dramatically easier to scale. A regional key-value store can handle the writes locally, asynchronously replicating to other regions, and the TTL guarantees eventual cleanup even in the face of replication lag.

The trade-off is a few seconds of lag when enforcing the limit — if you stop streaming, it can take 5-15 seconds before the slot frees up. Every user has experienced this. It is the visible symptom of a distributed systems optimization.

Widevine L1, L2, L3 — The Reason Your Rooted Android Streams in 480p

Google's Widevine DRM defines three security levels. These are not about encryption strength — all three use the same AES-128. They are about where the cryptography runs.

LevelCryptoDecryptionTypical Devices
L1Inside TEEInside TEEiPhones, Samsung flagships, Pixel, Chromecast Ultra, Apple TV 4K, modern smart TVs
L2Inside TEEOutside TEERare in practice — intermediate devices
L3Software onlySoftware onlyDesktop browsers, older Android, rooted devices, emulators

Netflix (and other studios) contractually require Widevine L1 + HDCP 2.2 for 4K streaming. They require L1 for most HD content. L3 devices are usually capped at 480p or 540p because the studio does not trust a software-only decryption path to resist ripping.

This is why:

  • Chrome on Windows streams Netflix in 720p (L3 CDM)
  • Safari on macOS streams in 1080p (hardware-assisted FairPlay)
  • Apple TV 4K streams in 4K HDR (FairPlay with hardware path)
  • A rooted Android device is downgraded to 480p (Widevine detects root and downgrades to L3)
  • A custom ROM without certified Widevine gets L3 regardless of hardware capability

The license server enforces these rules at request time by reading the device attestation and comparing it to the requested quality. If the device is L3 but the manifest lists 4K, the license for the 4K key is simply denied and the player transparently drops down to a lower quality.

HDCP — The Last-Mile DRM Your HDMI Cable Enforces

DRM does not stop at the device. Once the pixels are decoded, they still have to travel over HDMI (or DisplayPort) to your TV, and that link is also encrypted — using a protocol called HDCP (High-bandwidth Digital Content Protection). HDCP is a completely separate DRM system from Widevine/PlayReady/FairPlay. It governs the link between your playback device and your display.

HDCP versions matter:

  • HDCP 1.4 — required for HD content. Broken years ago but still widely deployed.
  • HDCP 2.2 — required for 4K content from most studios. More secure handshake, revocable device keys.
  • HDCP 2.3 — minor update, some newer devices use this.

When your playback device connects to a TV, they run an HDCP handshake. If the handshake fails (bad cable, non-HDCP TV, HDCP splitter in between), the playback device refuses to output protected content. You have probably seen this: you plug a device through a cheap HDMI switch and Netflix drops to 480p or shows a black screen. That is HDCP failing, not the network.

The license response from the Widevine license server can include a flag that says "require HDCP 2.2 on the output link." If the player detects a non-compliant output, it downgrades or stops. This is enforced all the way down to the display controller hardware on modern SoCs.

Open Connect — Why Your Netflix Stream Does Not Actually Come From Netflix

Here is the piece that makes Netflix's economics work. A traditional CDN (Cloudflare, Akamai, Fastly) charges per gigabyte for bandwidth. Netflix streams trillions of gigabytes per year. A traditional CDN bill would be crushing.

So Netflix built Open Connect — their own CDN. But not a cloud CDN. Open Connect is a fleet of physical caching appliances called OCAs (Open Connect Appliances) that Netflix ships for free to internet service providers. ISPs install them inside their own data centers, connected to their own networks.

When you hit play, the Netflix client is redirected to an OCA inside your ISP. The encrypted video segments come from that OCA — inside your ISP's network, a few hops from your home. The traffic never crosses the public internet and never touches an AWS S3 bucket directly (though Netflix originates content from AWS for distribution to OCAs). From the ISP's perspective, Netflix is saving them enormous amounts of transit bandwidth. From Netflix's perspective, they just eliminated their single largest operational cost.

Critically, the OCAs only serve encrypted content. They do not know the keys. They do not need to. The license flow still runs through Netflix's central licensing infrastructure. OCAs are dumb caches that deliver opaque ciphertext at extremely high throughput. An attacker who somehow dumped an OCA would get terabytes of encrypted video and nothing else. This is the elegant part: because the content is encrypted at rest on every OCA, Netflix can push their CDN into environments they do not fully control (ISP networks) without compromising their DRM guarantees.

Key Rotation and Live Streams

For live content (sports, live events), a single content key for the entire stream is a security risk — if it leaks, the whole broadcast is compromised. CENC supports key rotation: different segments of the same stream can be encrypted with different keys.

The mechanism is built into DASH. The manifest references a license server URL, and the player is expected to request new licenses as it encounters segments with new KIDs. The rotation interval is typically every few minutes. The license server issues a fresh license for each period, which means the player does many more license exchanges during a live stream than during a movie — and the license server must handle the multiplied load.

This is operationally significant: a 2-hour movie might trigger one license request per device. A 2-hour live soccer match with 10-minute key rotation might trigger 12 license requests per device. At 50 million concurrent viewers, that is a 12x spike in license traffic for exactly the moments when reliability matters most. Live-streaming DRM infrastructure is sized very differently from VOD DRM infrastructure.

Offline Downloads — A Different Beast Entirely

When you download a Netflix title to your phone, you are not downloading an MP4 you can copy around. You are downloading encrypted CENC segments into Netflix's app-private sandbox plus a persistent license that lives inside your device's Content Decryption Module, bound to that specific device's hardware identity. The persistent license carries two expiration clocks — up to 30 days of availability and 48 hours from first play — both enforced locally by the CDM without needing a network connection. This is why uninstalling Netflix does not reset download counts: the CDM's secure storage survives app uninstalls even though the encrypted segments do not.

The full step-by-step walk-through is in a dedicated post: How Netflix Downloads Actually Work — Where the Files Live, Why You Can't Copy Them, and What Happens When the License Expires. It covers the offline manifest flow, the persistent license request, where the files actually live on Android and iOS, why rooted devices cannot extract them, how the expiration clocks are enforced, and what happens when Netflix revokes a title server-side.

What This Means If You Are Building Any Kind of Streaming Infrastructure

You may never build a Netflix competitor, but the architectural patterns here show up everywhere in modern DevOps:

  • Session enforcement at the authorization layer, not the data layer. Do not try to check plan limits inside your CDN or object store — enforce it at a token-granting service, and issue short-lived credentials that expire automatically.
  • Content-addressable, encrypted-at-rest data. Store your assets encrypted, distribute them freely through any CDN, and gate access entirely through key delivery. This is essentially how AWS S3 Server-Side Encryption with KMS works under the hood.
  • TTL-based state for scale-sensitive systems. Session tracking, rate limiting, and locking are dramatically easier when you use TTL expiry instead of explicit cleanup paths. Redis, DynamoDB TTL, etcd leases — all follow this pattern.
  • Fail closed on security paths. When your license server's key store is flaky, deny the request. Never default-allow on security infrastructure. This single principle would have prevented entire categories of real-world breaches.
  • Push CDNs into partner networks. Netflix's Open Connect is the extreme version, but the same idea applies to edge computing, POPs inside customer infrastructure, and regional data residency. Move the data to the viewer, not the viewer to the data.
  • Attestation is authentication. Widevine's L1/L2/L3 model — verifying not just who is asking but what is asking — is the same pattern as IAM Roles for Service Accounts, OIDC for CI/CD, and confidential computing. The future of authorization is attested identity.

The Part Nobody Wants You to Know

None of this is unbreakable. Every few years, a Widevine L3 exploit appears, a content key leaks, or a ripping tool catches up. Studios know this. Netflix knows this. The goal of DRM at this scale is not perfection — it is to make casual copying hard enough that the economic value of the catalog is preserved while keeping the experience seamless for legitimate viewers. When you look at it that way, the fact that 200 million people can simultaneously stream encrypted content at sub-100ms license latency, across three DRM systems, on devices Netflix has never physically touched, is one of the most impressive pieces of distributed systems engineering deployed in production anywhere on the internet.

And the wild part is that most of it runs on standard DevOps primitives you already know — stateless HTTP services, KMS-backed secret stores, globally-replicated key-value stores, CDNs, circuit breakers, TTL caches. The genius is in how they are composed, not in any single exotic component.

Frequently Asked Questions

What DRM does Netflix use?

Three: Widevine (Google) for Chrome, Firefox, Android, and most smart TVs; PlayReady (Microsoft) for Windows, Xbox, and older TVs; FairPlay Streaming (Apple) for Safari, iOS, and tvOS. One CENC-encrypted file is served to all three thanks to Common Encryption.

What is Common Encryption (CENC)?

A standard (ISO/IEC 23001-7) that lets one encrypted video file work with multiple DRM systems. The content is encrypted once with AES-128, and each DRM has its own way of delivering the key to the player through a license exchange.

Why does my Android phone only stream Netflix in 480p?

Your device probably only supports Widevine L3 (software-only decryption), which studios do not trust for HD or 4K content. Flagship phones with hardware-backed Widevine L1 get HD and 4K; rooted devices, custom ROMs, and emulators are downgraded to L3 and capped at SD.

How does Netflix enforce 4-screen limits globally?

Concurrent sessions are tracked by the license server with short-lived TTLs. Players heartbeat during playback to renew their session; when heartbeats stop, the TTL expires and the slot frees up automatically. This turns a global consistency problem into a TTL problem that scales horizontally.

Why is my Netflix stream capped at 480p when I use an HDMI splitter?

HDCP (a separate DRM for the HDMI link) failed to establish a protected path. Most studios require HDCP 2.2 for 4K. If your HDMI chain fails the handshake, the playback device refuses to output protected content at high quality and downgrades or blacks out.

Is the Netflix video stored on AWS?

The master copies and encoding pipeline live on AWS, but the actual playback bytes come from Open Connect Appliances hosted inside internet service provider networks. The OCAs only serve encrypted segments; the license exchange still goes through Netflix's central licensing infrastructure.

Can Netflix employees see what I am watching in real time?

The license server logs every license request for audit purposes (what, where, when, which device, which quality). Whether a specific employee can query that data is a question of internal access controls, not DRM architecture. The DRM infrastructure itself does not need to know the content of what you are watching — only the KID (key identifier) being requested.


Next Steps

If you want to go deeper on the DevOps patterns this post touched on, these guides are good follow-ups:

  1. AWS IAM Best Practices — Least Privilege — the same attestation + authorization model Netflix uses, applied to your own cloud infrastructure
  2. GitHub Actions OIDC — No Access Keys — attested identity for CI/CD, the cloud equivalent of Widevine device attestation
  3. Kubernetes RBAC Explained — authorization layering, the pattern Netflix uses at its license server
  4. Free DevOps resources — including interview prep and production architecture guides

This was a long post. If you made it to the end, you now understand a piece of infrastructure that almost nobody outside streaming media companies can explain. Share it with someone who thinks "DRM is just encryption."

AG

Akshay Ghalme

AWS DevOps Engineer with 3+ years building production cloud infrastructure. AWS Certified Solutions Architect. Currently managing a multi-tenant SaaS platform serving 1000+ customers.

More Guides & Terraform Modules

Every guide comes with a matching open-source Terraform module you can deploy right away.