8. Netflix
Hard
Design a video streaming service where content can be uploaded and viewers can search and play videos
- Functional Requirements
- Users should be able to create and account and subscribe for a plan.
- Users should be able to manage multiple profiles.
- Users should be able to search for a video title.
- Users should be able to watch a video.
- Netflix employees should be able to upload a video from backend to make it available on Netflix platform.
- Nonfunctional Requirements
- System should be highly reliable. Any video uploaded should not be lost.
- System should be highly available.
- Users should be able to stream videos in Realtime without any lag.
- Assumptions
-
Video recommendations
-
Most popular videos
-
Subtitles
-
Grouping of videos (e.g. TV Series, treat each video as independent)
-
Average number of videos users watch daily = 3
-
Number of videos watched per second= (#active users _ #average videos watched daily)/86400 = 3472(100M _ 3/86400)
-
Size of the content stored on a daily basis = #average size of video uploaded every min _ #pairwise combination of resolutions and codecs _ 24_ 60 = 36 TB/day (=2500MB _ 10 _ 24 _ 60)
-
- Estimated Usage
Let’s do some back-of-the-envelope calculations to estimate the bandwidth and storage required.
- Total number of daily active users = 100 million
- Average number of videos watched by each user per day = 5
- Average size of one video = 500 MB
- Average number of video uploaded per day from backend = 1,000
Seen this question in a real interview before?
Not all editor features are supported on mobile