Vibe Engines
YouTube

Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path

System Design

Design Netflix

Step 1 / 9

Learn system design by building a video streaming service like Netflix step by step.

The numbers to beat~95%+served from edgeimmutablesegmentspetabytesin origin

The whole design, in writing

Every step of the build above, written out: the problem each piece solves, the option that was taken and the ones that were not, the numbers, and how it fails in production.

The big idea

What does streaming take?

One title streamed to hundreds of millions of people, on every device and connection speed, starting in under two seconds and never buffering. That’s petabytes of video moving constantly — no single data center could push that much traffic to the world.

Viewerpresses play
New in this step: Viewer.

The trick: don’t send video from the middle. Pre-encode each title into many quality levels, push copies to caches near every viewer, and let the player pick the bitrate its connection can handle, segment by segment. The control path is tiny; the data path lives at the edge.

What the new pieces do

Viewerclient
Someone hitting play on a TV, phone or laptop. They expect video in under two seconds, no buffering, at the best quality their connection allows.

Step 1 · Press play

The play path

Tapping play has to do two very different things fast: confirm you’re allowed to watch this title here, and figure out where to get the bytes. Mixing authorization with byte delivery would make both slow.

Playback APIManifest ServiceCDN EdgeCatalog
New in this step: Playback API, Manifest Service, CDN Edge, Catalog. · swipe to pan the diagram

Press play. Two jobs: check the viewer is allowed, and deliver gigabytes of video. How do you split it?

  1. Auth is tiny and smart; byte-pushing is huge and dumb. Welding them together means scaling your auth logic every time traffic grows — and one slow stream can drag down sign-ins.

  2. Control plane and data plane split cleanly — the API makes small smart decisions, the CDN moves the bytes. Each scales on its own terms.

  3. Now thousands of dumb caches all need your subscriber DB, licensing rules and session logic. Edges should stay simple, cheap and replaceable.

The Playback API checks the Catalog (subscription, region, licensing), then a Manifest Service returns a descriptor pointing the player at the nearest CDN edge. The player then streams chunks straight from the edge — control and data are cleanly split.

Why this piece earns its place

The split moves the blast radius, it doesn’t remove it. Once bytes are leaving the edge, a stream already running barely depends on us — the player is holding a manifest and pulling immutable segments, so it plays on through a total Playback API outage. But nobody can start one. The play button becomes the availability floor for the whole product, and it sits on top of subscription state, region rules and licensing windows, which are databases, and databases get slow. So I’d design that path to degrade rather than fail: cache the authorization decision per device for a short window, and treat a Catalog timeout for a known-good subscriber as allow-and-log instead of deny, because refusing to play for a paying member is a worse outcome than briefly streaming to a lapsed one. The second consequence is that a manifest is a decision frozen at play time. It names edges, and a two-hour film outlives the health of any one of them, so it has to carry alternates and stay cheap enough that a player can re-fetch it mid-session without the API feeling a stampede.

What the new pieces do

Playback APIbackend
Checks the user can watch (subscription, region, licensing), then hands back a manifest pointing at the nearest CDN. It never streams bytes itself.
Manifest Serviceservice
Builds the playlist the player follows: the list of quality levels, segment URLs, audio tracks and subtitles for this title on this device.
CDN Edgecache
Serves the actual video chunks from a server physically close to the viewer. Almost all bytes come from here, never from central storage.
Catalogstore
Titles, seasons, episodes, artwork and licensing windows — the data the UI browses and the Playback API checks before authorizing a stream.

Step 2 · Where the bytes live

Origin & edge

Every viewer streaming from one central store would saturate it instantly and add cross-country latency to every chunk. Yet you still need one durable, authoritative copy of every title.

CDN Edgecached segmentsOrigin Storagemaster + renditions
New in this step: Origin Storage.

Hundreds of millions of viewers need the same files. Where do the bytes live?

  1. It saturates instantly and adds cross-continent latency to every chunk. Central storage can be the source of truth — never the serving tier.

  2. That’s petabytes times every region, mostly for titles nobody there watches. You only need the hot slice near viewers.

  3. Origin holds everything once; edges cache what their viewers actually watch. Immutable segments mean the cache never goes stale.

Keep masters and all encodings in Origin Storage (cheap, durable blob storage), but serve viewers from CDN edges. On a cache miss the edge pulls a segment from origin once, then serves it to everyone nearby. Video segments are immutable, so they cache forever.

Why this piece earns its place

This step quietly assumes popularity is steep enough that the hot slice an edge can hold — roughly 5% of the catalog — really does cover almost everything watched near it. That holds for a launch title and for a big head-heavy catalog. It stops holding in the places that look least important: a region whose local-language shows are each small, a catalog grown to tens of thousands of titles, and a homepage deliberately pushing people off the head of the distribution. Then the request hit-rate barely moves while the byte hit-rate falls, and origin egress starts scaling with misses rather than with viewers. So I’d measure this in bytes, per edge, and read it per region rather than globally, because the average hides exactly the market that’s drifting. The defenses are unglamorous: size an edge against its own local tail instead of uniformly, and let a cold title’s first viewer pay a slightly slower start while the edge fills behind them — a much better trade than pulling a whole rendition in before playback is allowed to begin.

  • ~95%+served from edge
  • immutablesegments
  • petabytesin origin

What the new pieces do

Origin Storagestore
The durable home of every title in every encoding. The CDN pulls from here on a cache miss; viewers essentially never touch it directly.

Back of the envelope

2h × 5 Mbps ≈ 4.5 GB
one movie, at a single 1080p bitrate
× ~10 rungs × codecs ≈ 50–100 GB
what one title really costs in origin
× tens of thousands of titles ⇒ PBs
why origin is cheap blob storage, not SSDs
edge holds ~the hot 5%
popularity is skewed — cache only what’s watched

Step 3 · One stream, every connection

Adaptive bitrate

A phone on 3G and a TV on fiber can’t use the same file. A fixed quality either buffers constantly for the slow viewer or looks terrible for the fast one — and connections change mid-show.

ViewerPlayback APIManifest ServiceCDN EdgeOrigin StorageCatalog
The system as it stands at this step. · swipe to pan the diagram

A phone on flaky 3G and a TV on fiber both press play on the same film. What do you ship them?

  1. It buffers for the phone and looks soft on the TV — and connections change mid-show, so even “good enough” isn’t stable.

  2. The server can’t see last-mile conditions in real time, and holding per-viewer stream state for millions of sessions doesn’t scale.

  3. The intelligence lives in the client. The server just offers a ladder; the player climbs and drops it as its own throughput changes.

Encode each title as an ABR ladder: the same content at many resolutions/bitrates, each sliced into short segments. The manifest lists them all; the player measures throughput and switches levels per segment, climbing in quality or dropping to avoid a stall.

Why this piece earns its place

The knob here isn’t really the ladder, it’s the buffer the player fills before it dares climb. With segments around four seconds, a switch lands about one segment later, so the player is always deciding on stale information — picking the rung for bytes it will show several seconds from now. Let the buffer run long and it reacts late, holding a rung through a dip it could have ridden out, and every minute of buffer a viewer abandons is bandwidth we paid for and nobody watched. Keep it short and one throughput wobble empties it and the stream stalls, which is the single thing this design exists to prevent. I’d set it asymmetrically: climb slowly, drop immediately, because a rebuffer costs far more than a minute at a lower rung. The neighbouring trap is oscillation. With rungs from 235 kbps to 16 Mbps, a connection parked between two of them can flap every segment, and viewers notice flapping more than they notice a steady, slightly softer picture — so a step up should require sustained headroom, not one good segment.

  • 1title, many bitrates
  • ~2–10sper segment
  • per-segmentquality switch

Back of the envelope

ladder: 235 kbps → 16 Mbps
~10 rungs, 240p up to 4K
segments ≈ 4s
a 2h film ≈ 1,800 segments per rung
switch cost = 1 segment
worst case, quality adapts within ~4 seconds

Step 4 · Make the ladder

The transcoding pipeline

Studios deliver one giant, pristine master. Devices need dozens of encodings (codecs, resolutions, bitrates) of it — and re-encoding a two-hour film serially would take ages per title.

ViewerStudio IngestPlayback APIManifest ServiceCDN EdgeTranscode Pipeline
New in this step: Studio Ingest, Transcode Pipeline. · swipe to pan the diagram

The studio hands you one pristine 2-hour master. Encoding it into ~10 quality rungs serially would take days. What now?

  1. Vertical scaling hits a wall fast, and you re-buy it for every new codec generation. The job is still fundamentally serial.

  2. Segments are independent, so a movie becomes ~18,000 small jobs. Throw workers at it and days become minutes-to-hours.

  3. You’d pay the same heavy compute again and again, and the first viewer of every title eats a giant delay. Do it once, offline.

A Transcode Pipeline splits the master into chunks and encodes each chunk at every rung of the ladder in parallel across a worker fleet, then writes the renditions to origin. Chunking turns a slow serial job into a massively parallel one.

Why this piece earns its place

Parallelism turns one long job into a join, and a join is governed by its slowest branch. A film isn’t publishable when the average chunk finishes; it’s publishable when all 18,000 jobs have, so the hour this buys is really the p99 job plus however long it takes to notice the handful that died. At that fan-out something always dies — a bad worker, a reclaimed spot instance, one chunk that trips an encoder bug — so jobs must be idempotent, keyed by title, chunk and rung, safe to re-run blind, with stragglers speculatively re-executed rather than waited on. The subtler cost is at the seams: each chunk is encoded without seeing its neighbours, so encoders make independent decisions at the boundaries. Every chunk at a rung has to stay interchangeable with the same chunk at every other rung, or the per-segment switching from the previous step shows up as a visible jolt. That means fixed boundaries aligned to one segment grid across the whole ladder, and a check that plays the assembled renditions and inspects the seams before a title is marked available — not a count of jobs that exited zero.

What the new pieces do

Studio Ingestsource
The pristine, enormous source file from the studio — one title, before it’s broken into the many encodings devices actually stream.
Transcode Pipelineworker
Chops the master into thousands of chunks and encodes each at many resolutions and bitrates, in parallel. The factory behind adaptive streaming.

Back of the envelope

1,800 chunks × 10 rungs = 18,000 jobs
one film becomes a massively parallel batch
~2 min/job ÷ 600 workers ≈ 1 hour
vs ~25 days if you encoded it serially

Step 5 · Closer than the cloud

Open Connect at the ISP

Even regional CDNs sit a few network hops away, and at streaming’s scale the bandwidth between ISPs and the CDN becomes a real cost and bottleneck — especially when everyone watches the new release at once.

Open Connectembedded in ISPsOrigin Storagemaster + renditions
New in this step: Origin Storage → CDN Edge.

A new season drops Friday 8pm and a whole country presses play at once. How do you survive it?

  1. More edge servers don’t fix the bottleneck: the bytes still have to cross from your network into every ISP, and that transit link is the choke point.

  2. Tomorrow’s demand is predictable, so fill caches sitting inside the ISP during off-peak hours. At 8pm it’s just a local file read, next door.

  3. You’d survive by making the product worse on its biggest night. QoE is the thing you’re optimizing — degrading it is a last resort, not the plan.

Push popular content even closer: place cache appliances inside ISPs’ networks (Netflix calls this Open Connect) and pre-position likely-popular titles overnight, before demand hits. Most streams are then served from within the viewer’s own ISP.

Why this piece earns its place

Pre-positioning is a bet placed hours before the demand it serves, against a fixed amount of storage sitting in someone else’s building. So the real knob is how much of each appliance is reserved for tomorrow’s predicted hits versus the steady catalog people watch on an ordinary night. Push it too far toward the new release and you evict what a neighbourhood actually watches on a Tuesday — you win launch night and lose the other six days, with those misses crossing transit anyway. Leave it too small and the overnight fill never covers the surge, and 8pm crosses the ISP link exactly as it would have without an appliance there. The assumption underneath is that tomorrow is predictable, and usually it is: scheduled premieres, a known subscriber base, yesterday’s viewing. It breaks when something unplanned catches fire, which is precisely when it hurts. So the pull path has to stay a real, exercised path rather than a formality — an appliance must be able to fill during peak at low priority, and an unpredicted title has to be servable from a sibling appliance without a human deciding to push it.

Back of the envelope

1M concurrent × 5 Mbps = 5 Tbps
one mid-size country on launch night
global peak: tens of Tbps
no central network could push this
fill at 4am, serve at 8pm
ISP links are idle off-peak — use them

Step 6 · What to watch next

Recommendations

With tens of thousands of titles, a viewer who has to search for something often just leaves. Discovery, not playback, is what keeps people subscribed.

Playback APIOpen ConnectOrigin StorageTranscode PipelineRecommendations
New in this step: Recommendations. · swipe to pan the diagram

200M+ members, tens of thousands of titles. Where do you compute each person’s homepage ranking?

  1. Running heavy models per request for millions of concurrent users is brutally expensive and slow, and most of the signal barely changes hour to hour.

  2. Precompute candidates and rankings in batch, then cheaply re-rank with fresh context (time of day, device) on load. The same candidate-then-rank pattern as any feed.

  3. Discovery is the product. A shared list wastes the catalog and everything you know about each member.

A Recommendations system ranks titles per user from viewing history and similarity, building the personalized rows on the home screen. It’s computed largely offline and cached, then lightly personalized at request time — the same candidate-then-rank pattern as a feed.

Why this piece earns its place

Computing rankings largely offline assumes a member has a history and that it moves more slowly than the batch that reads it. Both assumptions break at the two moments that matter most. A brand-new member has no history at all, and their first session is the one that decides whether they stay — so cold start can’t be the same pipeline with an empty input; it needs regional and device popularity plus whatever they touch in the first few minutes, treated as exploration rather than as a ranking. The other break is the member who finished a series ten minutes ago: their state changed completely, and a row computed last night now describes someone else. That’s what the light request-time pass is really for, and it’s worth saying its job is recency, not polish. There’s also a feedback loop to name before it bites. People can only watch what the rows surface, and the rows learn from what was watched, so a title that’s never shown never earns the evidence that would get it shown. Left alone, it keeps re-recommending the head it already has proof for, and most of the catalog quietly stops existing. So the rows have to be pushed to explore — and it’s worth naming where that cost lands, because it isn’t here. Every viewer this page walks off the head is a viewer asking an edge for something it didn’t predict.

What the new pieces do

Recommendationsservice
Ranks titles per user from viewing history and similarity. Most of what people watch comes from these rows, so they’re central, not a side feature.

Step 7 · Measure everything

Playback events & QoE

You can’t see what users see. Is a region buffering? Did a CDN node degrade? Which titles are actually watched to the end? Without telemetry you’re flying blind on quality and on billing.

ViewerPlayback APIOpen ConnectOrigin StorageTranscode PipelineRecommendationsPlayback Events
New in this step: Playback Events. · swipe to pan the diagram

A CDN node in São Paulo starts silently degrading at 9pm. How do you find out?

  1. By then you’ve burned hours of bad streams. Viewers don’t file tickets; they just leave.

  2. Server-side checks miss what matters: a node can answer pings fine while serving real viewers slowly over a congested local path.

  3. The player sees the truth. Aggregate QoE events per region and edge in near-real-time, and a degrading node lights up in minutes — then you route around it.

The player streams Playback Events — start time, rebuffers, bitrate switches, watch progress — onto an event pipeline. Those feed real-time QoE monitoring (route around a bad edge), view counting, and the recommendation models, closing the loop.

Why this piece earns its place

Routing on telemetry means the measurement shares a network with the thing it measures. The sessions having the worst time are the least able to report it: a player on a congested path delays or drops its events, and one that gives up and closes sends nothing at all — so a badly degrading edge can read as quiet rather than bad. That argues for watching starts alongside outcomes, since a region whose session count falls while its reported rebuffer rate stays flat is a stronger signal than either number alone. The other hazard is acting on noise. Sliced per edge and region, billions of daily events still thin to a handful of sessions for a small node in a quiet hour, and a reroute isn’t free — it moves viewers onto a further cache and warms it from cold. So I’d require a minimum session count before a node is allowed to fail, compare it against its own baseline rather than a global threshold because a rural ISP is permanently slower than a fibre metro, and shift traffic gradually and reversibly so a false positive costs a little quality instead of an outage.

What the new pieces do

Playback Eventsbus
A firehose of play, pause, seek, bitrate-switch and rebuffer events. Feeds quality monitoring, billing/views, and the recommendation models.

Back of the envelope

100s of events per session
play, pause, seek, switch, rebuffer, heartbeat
× 100M+ sessions/day ⇒ billions
this is Kafka-scale stream processing

You did it

You just designed Netflix.

ViewerStudio IngestPlayback APIManifest ServiceOpen ConnectOrigin StorageTranscode PipelineCatalogRecommendationsPlayback Events
The finished design, end to end. · swipe to pan the diagram

Everything you assembled, in order

  • A play path that splits authorization (API) from byte delivery (CDN).
  • Durable origin storage with immutable segments cached at the edge.
  • An adaptive-bitrate ladder the player switches between per segment.
  • A parallel, chunked transcoding pipeline that builds the ladder offline.
  • Open Connect caches inside ISPs, pre-filled with predicted-popular titles.
  • A recommendation system that drives discovery across a huge catalog.
  • Playback/QoE events that monitor quality, count views and feed recs.

Where an interviewer pokes next

Getting the boxes right is the easy half. These are the questions that separate a candidate who drew the diagram from one who has run the thing. Answer each one out loud before you open it.

  1. Thundering herd: second 0 of a global launch?

    Pre-positioning absorbs the video bytes, but the play path still spikes. Answer with: pre-warmed caches, request coalescing at origin (one miss fetches for everyone waiting), and aggressive TTLs on manifests and metadata.

  2. Are view counts exactly right?

    No — playback events arrive at-least-once, so the pipeline dedupes by event ID and accepts eventual consistency. Billing-grade numbers come from idempotent aggregation, never from counting raw events.

  3. Where does DRM fit?

    Alongside the manifest: a license service issues decryption keys to verified devices on play. Segments sitting on the CDN are encrypted, which is exactly why caching them everywhere is safe.

  4. A whole edge region dies mid-stream — what do viewers see?

    Ideally nothing. Players retry segments against the next-best edge listed in the manifest, the buffer absorbs the gap, and QoE telemetry steers new sessions away from the region within minutes.

  5. Why not let the server pick the bitrate?

    The server can’t observe last-mile throughput in real time, and per-stream state for millions of viewers kills scalability. Client-side ABR keeps the serving tier stateless and dumb — by design.

Check yourself — the answers, and why

Eight steps in, these are the calls you should be able to make cold. Pick one, then read why.

  1. ~95% of all video bytes are served by…

    Origin is the durable copy; the edge is where bytes actually leave from.

  2. Video segments are perfect cache material because they’re…

    A chunk never changes → infinite TTLs, zero invalidation.

  3. Who decides when to switch quality mid-stream?

    The client measures its own throughput and picks per segment.

  4. Encoding a 2-hour film in ~1 hour is possible because of…

    Independent chunks → ~18,000 small encode jobs running in parallel.

  5. Open Connect appliances physically live…

    Inside the viewer’s own ISP — pre-filled overnight with predicted hits.

How you’d open this design in an interview

Before any boxes: agree what it must do, pin the qualities that shape everything, then build — naming each trade-off as you make it. The walkthrough above is that exact order.

What it must do

Agree on these before drawing a single box.

  • Play: authorize the viewer (subscription, region, licensing) and return a manifest pointing at the nearest edge.
  • Stream segments: deliver immutable video chunks from a CDN edge close to the viewer, never from the middle.
  • Adapt quality: encode an ABR ladder; the player switches bitrate per segment as its throughput changes.
  • Transcode: turn one studio master into dozens of codec/resolution renditions, offline and in parallel.
  • Recommend + measure: rank titles per user for discovery, and stream playback/QoE events back to close the loop.

The qualities that shape everything

Each one names the mechanism that buys it.

Auth and byte-delivery scale independently
A control-plane / data-plane split — a tiny Playback API authorizes and returns a manifest; the CDN moves the bytes.
No single data center pushes petabytes
Durable origin storage plus CDN edges that pull immutable segments on a miss — ~95% of bytes leave from the edge, never the middle.
One title serves every connection speed
An ABR ladder of many bitrates; the player measures throughput and switches level per segment to avoid stalls.
Encode a 2-hour film in ~1 hour
Chunk the master and encode each chunk × rung in parallel across a worker fleet — ~18,000 independent jobs, not one serial pass.
Survive a whole country pressing play at once
Open Connect appliances inside ISP networks, pre-filled overnight with predicted hits, so launch night is a local file read.
Catch a silently degrading edge in minutes
Players stream QoE telemetry (startup, rebuffers, bitrate switches); aggregate per region/edge and route new sessions around a bad node.

The trade-offs you say out loud

Senior signal isn’t the boxes — it’s naming what you gave up and why it was the right price.

Split control plane from data plane over one service that authorizes and streams

Auth is tiny and smart; byte-pushing is huge and dumb. Welding them means scaling auth logic with traffic and letting a slow stream drag down sign-ins. Split, and each scales on its own terms.

Origin + edge caches (hot slice) over one central store serving everyone

A central serving tier saturates instantly and adds cross-continent latency to every chunk. Origin is the durable source of truth; immutable segments cache forever at the edge, where ~95% of bytes leave.

Client-side ABR over the server picking each viewer’s quality

The server can’t see last-mile conditions in real time and holding per-viewer stream state for millions doesn’t scale. Offer a ladder; let the player climb and drop it as its own throughput changes.

Chunked parallel transcoding over encoding on the fly at first play

On-the-fly re-pays heavy compute every time and makes the first viewer of every title eat a giant delay. Chop the master into ~18,000 independent jobs and do it once, offline, in minutes.

Pre-position inside ISPs overnight over autoscaling the CDN at 7:55pm

More edge servers don’t fix the choke point — bytes still have to cross transit into every ISP. Tomorrow’s hits are predictable, so fill caches inside the ISP off-peak; 8pm becomes a local read.

The answer, out loud

What a strong answer to “Design Netflix (Video Streaming)” sounds like, first question to last trade-off. It is about 7 minutes of talking; the whiteboard and the interviewer fill the rest of the 45. Read it aloud once, then close the page and give it yourself.

  1. 0–3 min

    What actually makes this hard

    I’ll start with what I think makes this hard, because it isn’t the feature list. Playing a video is a simple request. Doing it for hundreds of millions of people, on every device and every connection, starting in under two seconds and never stalling, means moving petabytes continuously — and no single data centre can push that to the world. So the whole design hangs off one decision: the video must not come from the middle. I’ll assume we already hold the rights, and leave DRM aside unless you want it.

  2. 3–8 min

    What happens when you press play

    When someone presses play, two very different jobs happen. One is small and smart: is this person allowed to watch this title, in this country, right now. The other is enormous and dumb: move gigabytes. I’d keep them apart. A playback API checks the catalog for subscription, region and licensing, and hands back a manifest — a descriptor saying which qualities exist and where to fetch them. The player then goes straight to a CDN edge for the chunks. The API never touches a byte of video..

    Built in step 1: The play path
  3. 8–14 min

    Where the bytes live

    Then, where the video lives. I want one durable copy of everything and almost nobody reading from it. Origin is cheap blob storage holding every title in every encoding — petabytes, since a single film across its rungs and codecs is already fifty to a hundred gigabytes — and the serving tier is CDN edges near viewers. On a miss an edge pulls a segment from origin once, then serves everyone nearby off its own disk. What makes it work is that a segment never changes. Immutable content means long cache lifetimes and no invalidation, and in practice around ninety-five percent of bytes leave from an edge.

    Built in step 2: Origin & edge
  4. 14–21 min

    One title, every connection

    Now the client side. A phone on flaky 3G and a television on fibre can’t use the same file.. So each title is encoded as a ladder — roughly ten rungs, from a couple of hundred kilobits up to about sixteen megabits — cut into short segments of a few seconds. The manifest lists all of them, and the player measures its own throughput and picks a rung per segment. I want that decision in the client on purpose: the server can’t see the last mile, and holding per-viewer streaming state for millions of sessions is exactly the state I’m trying not to keep.

    Built in step 3: Adaptive bitrate
  5. 21–27 min

    How the ladder gets built

    That ladder has to exist before anyone presses play, so it’s an offline pipeline. The studio hands us one pristine master. Encoding it serially into every rung would take weeks per title. But segments are independent, so I chop the master into chunks — call it eighteen hundred for a two-hour film — and encode every chunk at every rung as its own job. That’s around eighteen thousand small jobs, and with a worker fleet it lands in about an hour instead of twenty-five days.

    Built in step 4: The transcoding pipeline
  6. 27–33 min

    Launch night

    The part I’d really want to talk about is launch night. A season drops at eight on a Friday and a country presses play together. A million concurrent streams at five megabits is five terabits per second, and buying more edge servers doesn’t help, because the bytes still have to cross transit into every ISP, and that link is the choke point. So we go closer than the cloud: cache appliances inside the ISPs’ own networks, filled overnight with what we expect people to want. At four in the morning those links are idle. At eight in the evening, pressing play is reading a file next door.

    Built in step 5: Open Connect at the ISP
  7. 33–38 min

    Getting people to the right title

    Discovery belongs in the architecture, not in a footnote. With tens of thousands of titles, a member who has to search often just leaves, so the rows on the home screen are most of the product. I’d compute them mostly offline — candidates and rankings in batch, cached per member — then run a light personalization pass at request time on cheap context like device and time of day. Running the heavy model per request for two hundred million members would be brutally expensive, and most of the signal barely moves hour to hour.

    Built in step 6: Recommendations
  8. 38–43 min

    Knowing what viewers actually see

    The last piece is that we can’t see what viewers see. So every player streams events back — startup time, rebuffers, bitrate switches, how far someone got. Hundreds per session across a hundred million sessions a day, which is a real stream-processing problem on its own. That feed does three jobs. It tells us a particular edge in a particular city is degrading, so we steer new sessions off it. It counts views. And it’s the training signal for recommendations, which closes the loop between the two halves of the system.

    Built in step 7: Playback events & QoE
  9. 43–45 min

    The trade, and what I’d do next

    To close: the trade running through all of this is that we give up central control to get scale. The player picks the quality, the edge holds a guess about what people want, the encode is committed hours early. Each is cheaper and sturdier than the alternative, and each is a decision we no longer get to make at request time. With more time I’d cover DRM and key delivery, and how the ladder is chosen per title rather than fixed — an animated film and a dark thriller genuinely don’t want the same rungs.

What this teaches

Learn system design by building a video streaming service like Netflix step by step. An interactive guide covering the play path, origin storage and CDN edge caching, adaptive bitrate streaming, the transcoding pipeline, Open Connect ISP-embedded caches, recommendations, and playback QoE events.

Key takeaways

  • A play path that splits authorization (API) from byte delivery (CDN).
  • Durable origin storage with immutable segments cached at the edge.
  • An adaptive-bitrate ladder the player switches between per segment.
  • A parallel, chunked transcoding pipeline that builds the ladder offline.
  • Open Connect caches inside ISPs, pre-filled with predicted-popular titles.
  • A recommendation system that drives discovery across a huge catalog.
  • Playback/QoE events that monitor quality, count views and feed recs.

Concepts covered

  • What does streaming take?
  • The play path
  • Origin & edge
  • Adaptive bitrate
  • The transcoding pipeline
  • Open Connect at the ISP
  • Recommendations
  • Playback events & QoE
built to be played, not memorized — make the calls, break the CDN, run the gauntlet.
Finished this one? 0 / 65 System Designs done
NextDesign a Rate Limiter Closest system design to this one

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More System Designs