Design a video streaming platform (like YouTube or Netflix)

Upload, process and stream videos to millions of viewers.

Why interviewers ask it

It tests large-file handling, background processing pipelines, CDNs and adaptive streaming — dealing with petabytes, not just requests.

Functional requirements

Non-functional requirements

From version 1 to the final design

  1. Version 1: upload a file to a server and serve it as it is.
  2. Version 2: files in object storage, details in a database.
  3. Version 3: a transcoding pipeline driven by a queue, producing several qualities.
  4. Version 4: segments with HLS or DASH, adaptive bitrate, CDN delivery, and view counts in the background.

The design, step by step

  1. Upload: the client gets a pre-signed URL and uploads in parts straight to object storage.
  2. An event on a queue triggers transcoding workers, which cut the video into short segments and encode several resolutions and bitrates (a graph of tasks).
  3. The outputs go to object storage, with a manifest (HLS or DASH) listing the segments for each quality.
  4. Playback: the player fetches the manifest and segments from a CDN and switches quality as bandwidth changes (adaptive bitrate).
  5. Video details live in a database with a cache; view counts are aggregated in the background.

Deep dives

Common mistakes

Not true: Transcoding: done inside the upload request, so the video is ready at once.
In fact: Transcoding takes minutes, so the request would time out. Accept the upload first, then transcode in background workers.

In the interview

Uploads go straight to object storage with pre-signed URLs. A queue triggers transcoding workers that encode short segments at several bitrates and write HLS or DASH manifests. Viewers stream the segments from a CDN with adaptive bitrate. Video details live in a database behind a cache, and view counts are aggregated in the background.

Part of Unit 8: High-level design questions in the free System Design course.