Design Case StudiesExpert17 min read2 questions

Design a Video Streaming Platform (YouTube / Netflix)

The largest-scale case study there is. Transcoding pipelines, HLS and DASH, why 95%+ of bytes must never touch your origin, and counting views at a billion a day.

Covers: Upload and transcoding pipeline, adaptive bitrate streaming, CDN strategy, storage tiering, view counting

Video is the case study where estimation genuinely decides the architecture. The bandwidth numbers are so large that they rule out entire designs immediately, and the whole system is organised around one goal: almost no byte of video should ever come from your own servers.

  • Scale: 500 hours uploaded per minute; 1 B hours watched per day.
  • Upload storage: at ~1 GB/hour source, 500 h/min × 60 × 24 ≈ 720 TB/day of source video, before transcoding.
  • Transcoded output: roughly 3–5× the source across renditions, so 2–4 PB/day.
  • Egress: 1 B hours/day at ~3 Mbps average ≈ 1.35 exabytes/day, or ~125 Tbps sustained. No origin can serve this - the CDN is not an optimisation, it is the system.
Filter
0/2 mastered
ExperttranscodingpipelinevideoAsked at YouTube, Netflix

30-second answer

Upload directly to object storage with a pre-signed URL so the bytes never pass through your application servers, using resumable multipart upload for reliability on poor connections. Then split the source into short segments - typically 5 to 30 seconds - and transcode segments in parallel across a worker fleet, which turns a two-hour serial job into a few minutes of wall-clock time. Each segment is encoded into every rendition, then the outputs are stitched into HLS and DASH manifests. The pipeline is a DAG of retryable stages with per-segment idempotency, because at this volume individual task failures are constant.

ExpertabrhlscdnAsked at Netflix, YouTube

30-second answer

The player fetches a master manifest listing every available rendition, then requests short segments one at a time. It measures throughput and buffer level and switches rendition between segments, so quality adapts to changing network conditions without interrupting playback. On distribution, essentially all bytes must come from CDN edges: pre-position popular content, use origin shielding for the long tail, and for the very largest platforms place caching appliances directly inside ISP networks so traffic never crosses the public internet at all.

Showing 2 of 2 questions for design-a-video-streaming-platform.

Check your understanding

4 questions · no sign-up, nothing stored

0/4 answered
Question 1

1.Why split video into segments before transcoding?

Question 2

2.Why must keyframes be aligned across renditions?

Question 3

3.What fraction of video bytes should be served from your origin?

Question 4

4.How should a billion daily views be counted?

Hands-on challenge

Build it - this is what you talk about in a deep-dive round.

Design the transcode and delivery pipeline

Handle 500 hours of upload per minute and 1 billion watch-hours per day, with explicit cost awareness.

Requirements

  • Design the upload path with pre-signed resumable uploads and describe failure handling.
  • Specify segment length and justify it against transcode parallelism and ABR switching granularity.
  • Define the rendition ladder and the popularity-based lazy-transcoding policy.
  • Design the CDN strategy with explicit hit-rate assumptions for head and long-tail content.
  • Design view counting including the definition of a view, deduplication and the rollup interval.

Stretch goals

  • Add live streaming with sub-5-second latency and explain what changes.
  • Estimate the monthly cost of transcoding and egress, and identify the two biggest savings.