Media & streaming · Advanced

Netflix-style video on demand

Cloud control plane, ISP-embedded cache appliances filled off-peak, per-title encoding.

Every part, and why it is there

TVs, phones & browsers

Thousands of device types. Each one browses and presses play through the cloud API, then pulls video from a nearby cache appliance.

Open Connect appliances

Netflix’s own CDN: storage-heavy servers placed inside internet providers and exchange points. Video travels a few network hops instead of across the internet, which is cheaper for everyone and better quality for the viewer.

Encoded catalogue (S3)

Every title in every encoding: many resolutions, bitrates and codecs, cut into small chunks. The source the appliances are filled from.

API gateway (Zuul)

Edge routing, authentication and load shedding for all non-video traffic. When the backend struggles it drops low-priority requests first so playback keeps working.

Playback API

When you press play it gathers what the player needs: which streams the device can decode, a licence, and a ranked list of appliance URLs to fetch from.

Steering service

Chooses which appliances should serve this viewer, based on their network, appliance health and which ones actually hold this title. Most of a CDN’s intelligence is in this choice.

Appliance health & content map

Appliances constantly report what files they hold, their load and their health. Steering reads this to avoid sending viewers to a full or broken box.

Licence service (DRM)

Issues the decryption licence for a title on this device. Studios require it; without a licence the downloaded chunks are unplayable.

Content keys

Encryption keys for each title, locked down tightly because they protect the whole catalogue.

Viewing history (Cassandra)

Where you stopped watching, on every device, written constantly and read on every play. A wide-column store handles that steady write volume across regions.

Studios

Deliver huge, high-quality master files for each new title.

Content ingest

Checks the delivered master, stores it and splits it into chunks so encoding can run in parallel.

Encoding jobs

Thousands of independent encode tasks per title. A queue lets a large fleet chew through them in parallel and retry failures.

Encoders

Produce the bitrate ladder for each title, tuned per title or even per scene: a cartoon needs far fewer bits than a grainy action film. Slow and CPU-bound, nowhere near any viewer request.

Asked in interviews at

  • meta
  • hubspot
  • mongodb

Learn more

All system design examples