# Streaming playback - the bytes were already next to you

> Why streaming is a bandwidth problem, solved by placing the bytes inside the network before anyone asks. Content is pre-positioned before anyone asks for it…

Source: https://tierslate.com/templates/netflix-streaming

Video & media · System design · deep · 11 step walkthrough · 5 tables

Why streaming is a bandwidth problem, solved by placing the bytes inside the network before anyone asks.

**Own this board: 800 credits.** The first act plays on the page. Owned once with credits, never a subscription.

## What this board gets wrong on purpose

The tension: Content is pre-positioned before anyone asks for it, so every edge appliance holds 200 TB of a 8 PB catalogue - 2.5 percent - chosen by a popularity model that is wrong for a whole country the day something unexpected trends, and every wrong guess is bandwidth paid for content nobody watched plus an origin fetch for the content they did. And the second-by-second decision that actually determines whether playback looks good is made by the CLIENT, from a throughput estimate that is always a few seconds stale: the player switches down after the buffer has already drained, which is why a rebuffer is usually visible in the telemetry a full ten seconds before the viewer sees the spinner.

## Practise this as an interview

Take Streaming playback - the bytes were already next to you as a timed system design interview on a blank board - on your own, with the requirements to check yourself against, or with a candidate you invite.

## Start here

### Why this design

"Design Netflix" is asked constantly and answered badly, because people draw a video database and a CDN box and stop. The real system is two systems with a 450:1 traffic ratio between them: a control plane that decides once per session what you may watch and from where, and a data plane that moves 198 PB a day in six-second segments. Interviewers use it to see whether you notice that the hard problem is bandwidth rather than storage, and whether you know who actually decides the bitrate - the client. Streaming teams spend their money on exactly those two facts.

### What you will learn

- Why the control plane (about 8,000 requests a second at peak) and the data plane (3.5 million segment GETs a second) are separate bands that scale and fail differently.
- How to size by bandwidth: 15 million concurrent streams at 3.5 Mbps is 52.5 Tbps of egress, and why that makes a commercial CDN a $4M-a-day line item.
- What a manifest carries - licensing, the bitrate ladder this device may use, and which edge box to fetch from - and why it must be correct even though it moves almost no bytes.
- How adaptive bitrate works from the client side, and why its throughput estimate is always a few seconds stale.
- Why content is pre-positioned inside ISPs before anyone asks for it: each appliance holds about 2.5% of an 8 PB catalogue, chosen overnight by a popularity guess.

### How to read this board

1. Press Play and follow the walkthrough: CONTROL PLANE across the top (once per session), then DATA PLANE underneath it (450 times per session).
2. Then BEFORE ANYBODY ASKS on the right - the overnight fill that puts the bytes next to the viewer - and QoE along the bottom, the only feedback loop.
3. 1 · Requirements - what must be correct and what may merely be fast.
4. 2 · Capacity estimation and 3 · Storage estimation - why 8 PB is small and 198 PB a day is not.
5. 4 · Availability - control plane down stops new sessions, data plane down stops the world.
6. 5 · How it works, then 6 · Deployment plan.
7. Finally the DATA MODEL below the band, then the argument this board leaves open on purpose: the pre-positioning guess is wrong for a whole country the day something unexpected trends, and the client switches bitrate after the buffer has already drained.

## 1 · Requirements

Playback is judged on three numbers a viewer can feel: how long from pressing play to the first frame, how often it stops, and whether it looks like the television it is being watched on. Everything here is in service of those three.

### Functional

- A viewer presses play and gets a first frame in under two seconds on a broadband connection.
- Playback adapts to the network continuously, without stopping, across the whole bitrate ladder.
- Only titles licensed in the viewer country and period are playable, and a device is only offered codecs it can actually decode.
- A DRM licence is issued per session per device and is revocable.
- Resume where you stopped, on a different device, within seconds of stopping on the first.
- Content is positioned close to viewers before they request it, and the positioning decision is measurable after the fact.

### Non-functional

- Start-up latency p95 under 2 seconds; rebuffer ratio under 0.2 percent of playing time across the fleet.
- Playback API availability 99.99 percent. It runs once per session, so an outage here stops new sessions - people already watching do not notice for 45 minutes.
- Data plane availability is effectively 100 percent by construction: many edges, and a client that fails over to another one mid-stream without a visible pause.
- Cost per gigabyte delivered is a first-class metric, tracked per ISP, because it is the difference between a viable business and an unviable one.
- No licence, key or manifest may be cacheable at a shared cache. The bytes are shared; the permission to play them never is.

### Questions to ask before designing this

- What is the concurrency peak, not the DAU? Every number that matters on this board - bandwidth, appliance sizing, API capacity - falls out of concurrent streams, and the ratio of peak concurrency to DAU varies by a factor of three between countries.
- Do we own CDN capacity or rent it? This single answer changes the architecture more than anything else on the page, because it decides whether pre-positioning is free or billed.
- How big is the catalogue in hours, and how many encodes per hour? 8 PB against 80 PB is the difference between an appliance holding 2.5 percent of the library and holding a rounding error.
- What fraction of viewing is the head? If the top 500 titles are 80 percent of hours, pre-positioning works. If the tail is fat, most of this design is wasted money.
- Is offline download in scope? It changes DRM from a session-lifetime problem to a persistent-key problem, which is a different security posture entirely.
- What device classes must be supported? A ten-year-old television that only decodes H.264 at 1080p forces every title to keep an H.264 ladder alive forever, and that is a permanent line on the storage bill.

## The rest of this board

This page publishes the question. The answer - 5 more written pages, an 11-step narrated walkthrough and a 5-table schema - is the board itself, and it opens in Tierslate.

- 5 written pages
- 11 walkthrough steps
- 5 tables (32 columns)

5 pages behind this one:

- Capacity estimation
- Storage estimation
- Availability
- How it works
- Deployment plan

## Related system design templates

- [Image CDN system design](https://tierslate.com/templates/image-cdn) - Why the cache key is the design, and why egress and the long tail of misses set the bill, not CPU.
- [Live streaming system design](https://tierslate.com/templates/live-streaming) - Why segment length sets latency, resilience and cost at once, and what each second removed costs.
- [Transcoding pipeline system design](https://tierslate.com/templates/video-transcoding) - Why one number, the size of a segment, sets the cost, latency and failure behaviour of the whole pipeline.
- [Video upload system design](https://tierslate.com/templates/youtube-upload) - Why a durable receipt for a 500 MB upload and a video that plays everywhere are two separate promises.
- [File upload system design](https://tierslate.com/templates/file-upload) - How presigned URLs send uploads straight to object storage, and what the server still has to check afterwards.
- [Music streaming system design](https://tierslate.com/templates/music-streaming) - Why audio is small enough to prefetch, and why play counts and royalties are the hard ledger underneath.
- [Short video feed system design](https://tierslate.com/templates/short-video-feed) - Why a short-video feed is ranking plus prefetch, and why the first second of video decides retention and cost.
- [Video calls system design](https://tierslate.com/templates/video-conferencing) - Why a group call forwards streams through an SFU, and how bandwidth estimation keeps a bad link from ruining the call.

All 100 system design templates: https://tierslate.com/templates (Markdown: https://tierslate.com/templates.md)
