Command Palette

Search for a command to run...

PHASE 12Advanced ~7 min· topic 11 of 39Level 3

System 12.11 — YouTube (Video Platform)

In one line

The media pipeline made enormous: upload, transcode variants, adaptive-bitrate streaming over CDN.

0/39 · 0%

Think of it like this

A video platform where uploading a single video quietly triggers a factory line behind the scenes: compressing it into many qualities (480p, 720p, 4K) so it plays smoothly whether you're on 4G or fibre.

Key ideas

  1. 01

    Upload: signed multipart upload to object store → video metadata → async transcode pipeline (workers + queue).

  2. 02

    Transcode: one raw file → many renditions (240p→4K, HLS/DASH segments, ~6s chunks) for adaptive bitrate.

  3. 03

    Serving: CDN is EVERYTHING — 90% of bytes come from edge; origin only for cold/miss; cache at edge + regional tier.

  4. 04

    Adaptive streaming: client switches rendition by bandwidth — manifest first (HLS .m3u8), segments by range request.

  5. 05

    Scale reality: 500h video uploaded per minute; 1B+ viewers. Storage: massive object store + tiered to cold storage.

  6. 06

    Metadata plane: video table (ids, title, views counter) in DB; views = Redis INCR + async flush to the row.

  7. 07

    Recommendations/search: ML offline + ES index; trending = streamed click/view aggregations.

  8. 08

    Interviews like the pipeline + CDN + the 'what's the actual bottleneck' answer (transcode CPU + edge bandwidth cost).

Code & diagrams

VideoUploadPipelinediagram

Upload once, transcode into every quality, serve from the edge forever.

Rendering diagram…

Explain without notes

01

Walk a 4K-upload: which services touch it, what the transcode queue holds, and what a worker crash loses.

Practice

01

Draw DASH/HLS rendition ladder + CDN layering + the view-count async pipeline.

Trade-offs

  • ↔

    Transcode quality vs CPU cost (rendition ladder = cost ladder); nearline vs cold storage for old uploads.

Run it in production

Completion checklist

  • I can present upload→transcode→CDN→adaptive-stream and the cost levers.

Back to phase