YouTube Flashcards
(45 cards)
What are the primary functional requirements for designing a system like YouTube?
- Stream videos
- Upload videos
- Search videos according to titles
- Like and dislike videos
- Add comments to videos
- View thumbnails
Functional requirements are the features and functionalities that users will experience in the system.
What are the key non-functional requirements for YouTube’s design?
- High availability
- Scalability
- Good performance
- Reliability
Non-functional requirements pertain to the system’s performance expectations.
True or False: YouTube requires strong consistency in its design.
False
The system does not require all users to receive immediate notifications for newly uploaded content.
What is the total number of YouTube users estimated?
1.5 billion
This number reflects the total user base of YouTube.
What is the average length of a video on YouTube?
5 minutes
This average length is used for various calculations in resource estimation.
What is the size of an average 5-minute video before processing?
600 MB
This size is the uncompressed format of the video before encoding.
What is the size of an average video after encoding?
30 MB
This size results from encoding using different algorithms for different resolutions.
Fill in the blank: The formula for total storage requirement is Total storage = Total upload/min × _______.
Storage min
Storage min is the storage required for each minute of content.
How much bandwidth is required for streaming videos if 480 Gbps is needed for uploading?
144,000 Gbps
This is based on the upload:view ratio of 1:300.
What is the estimated number of servers needed at peak load for YouTube?
Approximately 8K servers
This estimation is based on the number of requests per second and the server’s response capacity.
What are the key building blocks of YouTube’s design?
- Databases
- Blob storage
- CDN (Content Delivery Network)
- Load balancers
- Servers
- Encoders and transcoders
These components are crucial for the functionality and performance of the YouTube system.
What is the upload:view ratio assumed for YouTube’s bandwidth estimation?
1:300
This ratio indicates that for every uploaded video, there are 300 views.
What is the first step in YouTube’s high-level design workflow?
The user uploads a video to the server
This initiates the process of storing metadata and user data.
What does the encoder do in YouTube’s design?
Compresses the video and transforms it into multiple resolutions
Resolutions include 2160p, 1440p, 1080p, etc.
What is the purpose of the CDN in YouTube’s architecture?
Acts as a cache to enable low latency video streaming for users
It forwards popular videos for quick access.
What is the primary method used for uploading videos in the API design?
POST method
The endpoint is /uploadVideo.
What parameters are required for the /uploadVideo API?
- user_id
- video_file
- category_id
- title
- description
- tags
- default_language
- privacy_settings
Each parameter serves specific purposes related to the video upload.
What method is used for the /streamVideo API?
GET method
This method retrieves video streaming data.
What parameters are included in the /streamVideo API?
- user_id
- video_id
- screen_resolution
- user_bitrate
- device_chipset
These parameters help optimize video delivery based on user capabilities.
What does the /searchVideo API do?
Allows users to search for videos based on specific criteria
It uses the GET method.
What optional parameters can be used with the /searchVideo API?
- length
- quality
- upload_date
These parameters filter search results.
How does the like/dislike API function?
Uses the POST method to register a like or dislike
It updates the database based on the input.
What is the purpose of the commentVideo API?
Allows users to add comments to videos
It requires the comment_text parameter.