Design Netflix/YouTube
Design a video streaming platform like Netflix or YouTube supporting video upload, transcoding, and adaptive streaming.
Use distributed transcoding pipeline, CDN for delivery, and adaptive bitrate streaming for optimal user experience.
Consider video encoding and different quality levels
How does adaptive bitrate streaming work?
Think about CDN placement strategies
functional
- •Video upload
- •Video streaming
- •Search
- •Recommendations
- •User profiles
- •Watch history
non functional
- •High availability
- •Low latency playback
- •Adaptive quality
- •Global reach
bandwidth
15% of global internet traffic
video uploads
500 hours/minute (YouTube)
daily active users
200M DAU
storage
metadata
NoSQL (Cassandra/DynamoDB)
user data
Sharded PostgreSQL
raw videos
Object Storage (S3/GCS)
transcoded
Multiple resolutions in object storage
components
- •Upload Service
- •Transcoding Pipeline
- •CDN
- •Video Metadata Service
- •Recommendation Engine
- •Search Service
cdn
Edge servers cache popular content
protocol
HLS or DASH for adaptive bitrate
optimization
Predictive pre-fetching, regional caches
playback
Buffer ahead, adaptive quality based on bandwidth
cold start
Recommendations for new users based on demographics
content delivery
Open Connect (Netflix) - dedicated appliances at ISPs
formats
- •Multiple bitrates (360p to 4K)
- •Multiple codecs (H.264, VP9, AV1)
- •Adaptive segments (HLS/DASH)
pipeline
- •Upload to S3
- •Trigger transcoding
- •Generate multiple resolutions
- •Create thumbnails
- •Extract metadata