Google ★★★ Frequent Hard UploadTranscodeResumable

G11 · Design YouTube Video Upload & Transcode G11 · 设计 YouTube 视频上传与转码

Verified source经核实出处

YouTube architecture is well-documented; SD interview classic. Credibility A.

Architecture架构

flowchart LR
  U[Uploader] --> CHUNK[Chunked resumable upload]
  CHUNK --> BLOB[(Original blob)]
  BLOB --> Q[(Transcode queue)]
  Q --> WORK[Transcode workers]
  WORK --> MULTI[(Multi-resolution renditions)]
  MULTI --> CDN[CDN origin]
  WORK --> THUMB[Thumbnail + preview]

Key decisions关键决策

  • **Resumable chunked upload** (tus.io pattern) with content-hash dedup.**可断点续传的分块上传**(tus.io 风格)+ 按内容哈希去重。
  • **Parallel transcoding across segments**: split into 10 s chunks, transcode in parallel, reassemble.**分段并行转码**:切 10 s 块并行转码,再合并。
  • **Resolution ladder**: 144p-4K; pick codecs per region (VP9, AV1).**码率梯度**:144p-4K;按地区选 codec(VP9、AV1)。
  • **HLS/DASH manifests**; CDN edge caches per rendition.**HLS/DASH manifest**;CDN 边缘按码率缓存。

Follow-ups追问

  • DMCA takedown mid-transcode? hash-match audio/video against fingerprint db.DMCA 在转码中?音视频指纹匹配。

Related study-guide topics相关学习手册专题