High-Level Architecture• By Abha Gupta• 2025-02-20• 19 min read

Inside YouTube's Video Ingestion & Transcoding Engine: Processing 500 Hours per Minute

Executive Architectural Takeaway

How YouTube ingests 500 hours of video every minute, splits raw footage into chunked directed acyclic graph (DAG) pipelines, encodes across VP9/AV1 multi-resolution codecs, and delivers petabytes globally via Google Global Cache.

Production Architecture Case StudyPeer Reviewed

Inside YouTube's Video Ingestion & Transcoding Engine: Processing 500 Hours per Minute\n\nEvery single minute, users upload over 500 hours of video to YouTube. The platform must accept multiformat files (from 240p phone clips to 8K HDR cinematic footage), inspect them for copyright and safety, transcode them into dozens of resolution-bitrate permutations, and make them available globally within minutes.\n\n---\n\n## 1. High-Level Ingestion & Storage Architecture\n\n\n[Creator Client] ──(Resumable HTTP Chunk)──► [Edge GFE / Ingest Service]\n │\n ▼\n [Google Colossus File System]\n (Raw Master Video)\n │\n ▼\n [Distributed Job Scheduler]\n (Borg Transcoding DAG)\n ┌───────────┼───────────┐\n ▼ ▼ ▼\n [1080p] [4K AV1] [Audio AAC]\n └───────────┬───────────┘\n ▼\n [Bigtable Metadata Index]\n │\n ▼\n [Google Global Cache (GGC) CDN]\n\n\n---\n\n## 2. Step 1: Resumable Chunked Ingestion\n\nUploading an 80 GB raw video over an unstable home internet connection is prone to failure. YouTube uses a Resumable Upload Protocol:\n\n1. Session Handshake: The client initiates an upload session by posting file metadata (size, mime-type) to the Ingestion Gateway.\n2. Unique Session URI: The gateway allocates a stateful upload URI and stores session metadata in Spanner.\n3. Chunked Streaming: The client uploads the video in 8 MB chunks via HTTP PUT requests with Content-Range: bytes 0-8388607/85899345920 headers.\n4. Idempotent Retry: If packet loss occurs at byte 50,000,000, the client queries the current offset and resumes precisely where it was interrupted without re-uploading the preceding bytes.\n\n---\n\n## 3. Step 2: Chunk-Based DAG Transcoding\n\nTranscoding a 2-hour 4K movie serially on a single machine would take 4 to 6 hours. YouTube distributes the work using a Directed Acyclic Graph (DAG) workflow executed on Google Borg (the predecessor to Kubernetes):\n\n* Spatial/Temporal Slicing: The raw video is cut at Group of Pictures (GOP) boundaries (keyframes) into 5-to-10-second standalone segments.\n* Parallel Transcoding Workers: Hundreds of worker containers transcode individual chunks simultaneously in parallel.\n* Codec Ladder Execution:\n * Legacy Codec (H.264 / AVC1): Universally compatible with older phones and smart TVs.\n * Efficiency Codec (VP9): Delivers 50% bandwidth savings over H.264 at identical perceptual quality.\n * Next-Gen Codec (AV1 / Argos VPU): Custom Google hardware ASICs (Video (Pixel) Processing Units) providing extreme compression for high-volume 4K/8K content.\n* Stitching & Manifest Generation: Once all chunk tasks report completion, a manifest builder generates MPEG-DASH and HLS playlist files (.mpd and .m3u8).\n\n---\n\n## 4. Step 3: Global Media Delivery (Google Global Cache - GGC)\n\nDelivering millions of concurrent 4K video streams requires minimizing backbone transit costs:\n\n* Edge CDN Nodes (GGC): Google installs custom server clusters directly inside the core network centers of thousands of Internet Service Providers worldwide.\n* Popularity Tiering:\n * Top 1% Trending Videos: Cached permanently on SSDs within local ISP switches. When a local user hits play, bytes travel less than 5 miles.\n * Mid-Tier Content: Cached in Regional Google Edge Data Centers.\n * Long-Tail Content: Pulled on-demand from centralized Colossus blob stores with predictive pre-buffering.\n\n---\n\n## 5. Architectural Trade-offs & Production Metrics\n\n| Pipeline Dimension | Production Engineering Strategy | Trade-off Made |

AG
Authored by Abha GuptaEditorial Lead

Staff Software Architect and Founder of Being SDE. Specializes in distributed caching, wide-column database sharding, and high-concurrency real-time systems.

Previous Case StudyHow Discord Stores Trillions of Messages: The Migration from MongoDB to Cassandra to ScyllaDBNext Case Study Designing an Enterprise Distributed Rate Limiter: Algorithms, Redis Lua, and Edge Enforcement

Continue Your Architectural Prep

Explore 70+ interactive high-level system designs, low-level object-oriented patterns, and 50+ interview questions.