Interview Bootcamp
Vote

0% completed

Designing Youtube or Netflix

1. Why Youtube?

Youtube is one of the most popular video sharing websites in the world. Users of the service can upload, view, share, rate, and report videos as well as add comments on videos.

Try it yourself

Before looking at the solution, try designing it:

Designing Youtube (video)

Here is a video discussing how to design Youtube:

2. Requirements and Goals of the System

For the sake of this exercise, we plan to design a simpler version of Youtube with following requirements:

Functional Requirements:

  1. Users should be able to upload videos. 2

.....

.....

.....

Like the course? Get enrolled and start learning!
C

calvio

· 4 years ago

The system design interview is all about discussing trade-offs. How can you have a "Database Schema" section without discussing pros/cons, let alone any other alternatives?

O

ondakikamgittibunubulmakicin

· 4 years ago

Why do we use RDBMS instead of NoSQL. Same type of structures were stored in NoSQL in previous designs?

Show 1 reply
M

Mohammed Shoaib

· 4 years ago

Looking at the data size, Doesn't it make sense to store metadata as well in NoSQL. Math as follows: 230 videos per second, assume it takes 5MB to store metadata of a video. Total metadata per day = 230 * 10^5 * 5MB = 115 * 10 ^ 6 MB = 115TB. (10^5 seconds a day) At this rate, SQL DB becomes a bottleneck.

J

Junaid Effendi

· 4 years ago

Similar Q as previous chapters. VideoID sharding would still need Consistent Hashing to avoid future redistribution.

If we go with static modulus, 100 db servers meaning, videoid % 100, means when we need more we need to reshuffle the data.

Also, why not use nosql in this case? Since they can easily scale horizontally unlike mysql which are good with vertical scaling.

P

Prabhakar

· 4 years ago

In the Capacity estimation section - 1 min of video was estimated to require 50MB of storage under storage estimates section while the same 1 min of video was estimated to take 10MB of bandwidth.

Can you please explain the difference?

Show 3 replies
P

Pramod Kumar

· 5 years ago

Hi Team,

From the chapter "Processing Queue: Each uploaded video will be pushed to a processing queue to be de-queued later for encoding, thumbnail generation, and storage."

This processing queue is SPOF right, so how can we handle this.

Show 4 replies
J

Junaid Effendi

· 4 years ago

Load Balancing... If consistent hashing with http dynamic redirection would not work, then whats the solution?

N

Nishikant

· 4 years ago

Hi, Can you please explain these two statements in Load Balancing section :

  1. any busy server in one location can redirect a client to a less busy server in the same cache location
  2. inter-tier (or cross data-center) redirections lead a client to a distant cache location because the higher tier caches are only present at a small number of locations

For 1. How can we make sure that the other server in same cache location is not loaded and eventually the request does get served ? For 2. If we are only doing redirection in same cache location, how does point #2 come up ?

C

Chris

· 4 years ago

In the "Cache" section, you say "Our service should push its content closer to the user using a large number of geographically distributed video cache servers".

Isn't this essentially what the next section, "Content Delivery Network" describes? Is there some difference between the two?

Akib Ali

Akib Ali

· 2 years ago

there is nothing mentioned how view video will work, protocol, stream chunks and their orders.