Design YouTube / Video Streaming

Hard

Design a video sharing and streaming platform like YouTube. Handle video uploads, transcoding, adaptive bitrate streaming, recommendations, and content delivery at the scale of 500 hours of video uploaded per minute and 1 billion hours watched per day.

What to design

  1. What are the core functional requirements for a video platform like YouTube?
  2. What are the non-functional requirements? Consider upload scale, streaming latency, storage growth, and availability.
  3. Design the core APIs — video upload, streaming, search, engagement actions, and subscription management.
  4. What database and storage strategy would you use for video metadata, user data, and the videos themselves?
  5. How would you design the video upload and processing pipeline? Walk through what happens from upload to playable.
  6. How does adaptive bitrate streaming work? How would you serve video to users with varying network speeds?
  7. How would you use a CDN to deliver video content globally with low latency?
  8. How would you track and aggregate view counts and video analytics at scale?
  9. How would you design the video search functionality?
  10. How would you build the recommendation engine for the home feed and 'Up Next' suggestions?
  11. How would you handle content moderation and copyright detection at upload scale?