Example: YouTube

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.

image

Upload and watch video.

image
image

Step 2 - Propose high-level design and get buy-in

image

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.

image
image

Update the metadata

image

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.

image

Then have different video encodings and playback players.

Videos are streamed from CDN directly.

image

Step 3 - Design deep dive

Video transcoding

image
image
image

Speed optimization: parallelize video uploading

image

Speed optimization: place upload centers close to users

Use CDN upload centers.

SuperMade with Super