RETURN TO SYSTEM DESIGN VAULT (55)BLUEPRINT #07 // Medium
#07MediumMedia Streaming & Storage
Design Youtube or Netflix
ASKED IN INTERVIEWS AT:MetaAmazonSnowflakeWealthfront
EXECUTIVE SUMMARY & PROBLEM STATEMENT
Design a video streaming platform that supports multi-bitrate adaptive streaming (DASH/HLS), distributed CDN edge caching, and video ingestion transcode pipelines.
SCALE ESTIMATION & TRAFFIC ENVELOPE
DAILY ACTIVE USERS / TPS1 Billion DAU, 1 Billion video hours streamed daily
READ / WRITE TRAFFIC RATIO1000:1 extreme read bias
5-YEAR STORAGE CAPACITYExabytes of video chunks stored across Open Connect / edge caches
FUNCTIONAL REQUIREMENTS
- [1]Upload high-resolution video
- [2]Transcode into multiple bitrates (1080p, 720p, 480p)
- [3]Smooth video streaming on variable networks
NON-FUNCTIONAL REQUIREMENTS
- •Zero buffering under normal bandwidth
- •High availability and durability
- •Rapid processing of newly uploaded content
CORE ARCHITECTURAL COMPONENTS
Upload Service
Transcoding DAG Pipeline (Splitter, Encoder, Stitcher)
Object Store (S3)
CDN Edge PoPs (Open Connect)
User Analytics Engine
DATA SCHEMA & PERSISTENCE
VideoMetadata (id, uploader_id, title, manifest_url, duration, status), UserWatchHistory (user_id, video_id, timestamp_secs)
DISTRIBUTED TRADE-OFFS & FAILURE MODES
- ⟡Pre-transcoding all resolutions immediately vs lazy-transcoding rarely watched long-tail videos.