Practice

Design YouTube

YouTube is an online video-sharing platform where users can upload, share, and view videos. It supports various types of videos, including TV show clips, music videos, short and documentary films, movie trailers, and other content such as video blogging (vlogging), short original videos, and educational videos.

Functional requirement:

  • Viewers' Requirements:
    • Immediate video playback upon request
    • Consistent viewing experience regardless of traffic spikes
    • Compatibility across different devices and network speeds
  • Creators' Requirements:
    • Straightforward video upload URL procurement
    • Efficient file transfer to the server for various video sizes
    • Confirmation of successful upload and encoding

Scale requirement:

  • 100M Daily Active Users
  • Read:write ratio = 100:1
  • Data retention 10 years
  • Assuming that each user performs 1 write operations per day.
  • Assuming that each video is 500MB in size.
Step1
Step2
Step3
Step4
1. Resource Estimation