YouTube Architecture
Uploading, transcoding and serving video to billions.
On the roadmap:Software Architect · step 5: Learn from the giants
Overview
YouTube ingests uploads, transcodes them into many formats and bitrates, and serves them through a global CDN. Vitess helped scale MySQL for metadata.
Architecture highlights
- Asynchronous transcoding pipeline
- Adaptive bitrate streaming
- Vitess for sharding MySQL metadata
- Global CDN and edge caching
Architecture diagram
Key components
Upload service
Resumable ingestion of large files
Transcoding workers
Convert to multiple codecs and resolutions
Metadata DB (Vitess)
Titles, comments and counters
CDN / edge caches
Serve popular videos near viewers
Recommendation system
Ranks the home feed
Challenges and trade-offs
Hot content
Viral videos produce traffic spikes that must be absorbed at the edge.
Storage growth
Hundreds of hours are uploaded every minute, each in many renditions.
Counter accuracy
View counts need eventual consistency with fraud filtering.
Study: YouTube
Learn how YouTube is built from the people who explain it. Watch first for the picture, then read for the detail.
26 minDesign Youtube - System Design Interview
NeetCode · 575K views
Then
8 minHow YouTube Works - ComputerphileComputerphile · 521K views
43 minSystem Design Interview: Design YouTubeHello Interview · 264K views
1 h 25 minLearn High-Level System Design by Coding YouTube – Full CoursefreeCodeCamp.org · 160K views
24 minEngineering Manager System Design Interview (Wealthfront EM): Design YouTubeAced (formerly Exponent) · 98K views