- Step 1 - Understand the problem and establish design scope
- Step 2 - Propose high-level design and get buy-in
- Video uploading flow
- Video streaming flow
- Step 3 - Design deep dive
- Video transcoding
- Speed optimization: parallelize video uploading
- Speed optimization: place upload centers close to users
Step 1 - Understand the problem and establish design scope
Besides watching a video, you can do a lot more on YouTube. For example, comment, share, or like a video, save a video to playlists, subscribe to a channel, etc. It is impossible to design everything within a 45- or 60-minute interview.
Upload and watch video.
Step 2 - Propose high-level design and get buy-in
Video uploading flow
Let us examine how the video uploading flow works. The flow is broken down into two processes running in parallel. a. Upload the actual video. b. Update video metadata. Metadata contains information about video URL, size, resolution, format, user info, etc.
Update the metadata
Video streaming flow
When you watch streaming videos, your client loads a little bit of data at a time so you can watch videos immediately and continuously.
Then have different video encodings and playback players.
Videos are streamed from CDN directly.
Step 3 - Design deep dive
Video transcoding
Speed optimization: parallelize video uploading
Speed optimization: place upload centers close to users
Use CDN upload centers.