Back to System Design

SYSTEM DESIGN · QUESTION 111

How would you design a video streaming platform?

On this page
Advanced 4 min read
Interview-ready answerThe concise version to remember

I would separate upload and playback paths. Uploads land in object storage, enter an asynchronous transcoding pipeline that creates adaptive-bitrate renditions, and publish metadata after validation. Playback uses a manifest and CDN-delivered segments close to viewers. Design for encoding queues, cache misses, regional delivery, access control, and content lifecycle; the CDN reduces origin load but does not replace durable storage.

LET'S MAKE IT SIMPLE

First, the idea in plain English

A video file may be large and viewers have different network speeds and devices. The service stores an original, creates several playback versions, and delivers small segments through a nearby content network. The player can switch quality as conditions change.

A USEFUL COMPARISON

Picture it this way

A publisher prints the same book in several formats and places copies in local libraries. Readers receive the format that fits their needs from a nearby branch, while the central archive retains the source.

FOLLOW THE JOURNEY

Transcode uploaded video into CDN-delivered adaptive segments

Trace ingestion, encoding, manifests, CDN caching, and playback.

Transcode uploaded video into CDN-delivered adaptive segmentsTrace ingestion, encoding, manifests, CDN caching, and playback.Media delivery architecture
01Ingest and validateStore the upload, verify metadata, and run safety checks.
02Transcode asynchronouslyCreate renditions and segment manifests for supported formats.
03Distribute via CDNCache segments near viewers with access-aware tokens.
04Adapt playbackLet the player select segment quality based on conditions.

This simplified visual highlights the main relationships. In practice, the exact design depends on the requirements; Adaptive bitrate can reduce buffering.

A validated upload enters object storage and a transcoding queue; renditions and manifests are created, then a player fetches segments through a CDN.

How to read this visual
This simplified visual highlights the main relationships. In practice, the exact design depends on the requirements; Adaptive bitrate can reduce buffering.

UNDER THE HOOD

How it works, step by step

01

Ingest and validate

Store the upload, verify metadata, and run safety checks.

Why it matters: Invalid content should not enter expensive encoding.

02

Transcode asynchronously

Create renditions and segment manifests for supported formats.

Why it matters: Adaptive versions support different devices and bandwidth.

03

Distribute via CDN

Cache segments near viewers with access-aware tokens.

Why it matters: Edge delivery reduces latency and origin traffic.

04

Adapt playback

Let the player select segment quality based on conditions.

Why it matters: Adaptive bitrate can reduce buffering.

OUTSIDE THE TEXTBOOK

A practical example

A creator uploads a video. The service stores the original and queues transcoding into multiple resolutions. After encoding and moderation pass, it publishes a manifest. Viewers request segments through a CDN; cache misses fetch from object storage, while signed access tokens enforce private-video rules.

GO A LITTLE DEEPER

Technical details that matter

  • Adaptive bitrate streaming commonly uses segmented formats such as HLS or MPEG-DASH.
  • Transcoding capacity is asynchronous and can be prioritized or retried independently of upload traffic.
  • CDN cache keys and signed URLs must respect access permissions and content invalidation.

MAKE A GOOD CHOICE

When is this useful?

  • Video-on-demand and educational media platforms.
  • Large media distribution to geographically spread viewers.
  • Systems with expensive asynchronous content processing.
Consider the alternative

A managed video platform can handle encoding and delivery when custom control is not a core product requirement.

WATCH OUT FOR

Common misunderstandings

  • Serving large video files directly from application servers.
  • Publishing before transcoding and moderation complete.
  • Caching private content with a key that ignores authorization.

REAL-WORLD TRADE-OFFS

Limitations and failure cases

  • Transcoding consumes compute and storage for multiple renditions.
  • CDN cache behavior and invalidation can be difficult.
  • Network variability and device compatibility affect playback.

WHAT TO REMEMBER

Key takeaways

  1. 1Separate upload, asynchronous encoding, and playback.
  2. 2Use adaptive renditions and CDN segment delivery.
  3. 3Preserve access control through manifests and caches.

PRACTICE THE FOLLOW-UP

What might an interviewer ask next?

Why create multiple renditions?

They allow playback to adapt to bandwidth, screen, and device capabilities, reducing stalls while preserving quality when possible.

What happens on a CDN cache miss?

The CDN fetches from its configured origin, stores the response according to policy, and returns it; origin capacity and cache key correctness matter.

SAY IT OUT LOUD

How to explain this in an interview

“I would separate video ingestion from playback. Uploads go to object storage and an asynchronous pipeline creates validated adaptive renditions and manifests. Playback fetches segments through a CDN, with access-aware cache keys and signed authorization. I would monitor encoding queues, cache misses, startup delay, buffering, and origin capacity.”

Continue your learning path

Connect this question to the roadmap topic it supports.

Open roadmap topic