SysPadExamples › Design YouTube (upload + playback)

Design YouTube (upload + playback)

Upload → original storage → a transcoding-queue-driven worker pool (multi-stage DAG: codecs, resolutions, thumbnails) → transcoded storage + a completion handler updating metadata, with playback served from CDN.

The upload and transcoding pipeline, plus the CDN-served playback read path - two very different traffic shapes on one system.

Content Creator Users DNS Route 53 Load Balancer ALB Upload API Fargate Original Storage S3 Transcoding Queue SQS Transcoding Workers Batch AT LIMIT Transcoded Storage S3 Completion Queue SQS Completion Handler Lambda Metadata DB DocumentDB Viewer Users CDN CloudFront

How it works

Original Storage
The raw uploaded file, stored once. Landing it here and returning fast is what lets the slow transcoding happen asynchronously behind a queue.
Transcoding Workers
Stands in for a transcoding-server DAG: split audio/video, encode each codec/resolution/bitrate variant, watermark, thumbnail. Fanned out across a large Batch pool because each job is minutes long.
CDN
Playback front door. Nearly all watch traffic is served from the edge cache; only cold segments fall through to transcoded storage as the origin.

Request flows

Upload a video

  1. Content Creator
  2. DNS
  3. Load Balancer
  4. Upload API
  5. Original Storage
  6. Transcoding Queue
  7. Transcoding Workers
  8. Transcoded Storage
  9. Completion Queue
  10. Completion Handler
  11. Metadata DB

Watch a video

  1. Viewer
  2. CDN

Other interview practice

Open this architecture in SysPad · All examples