...

/

Copy-Evaluation

Copy-Evaluation

Fulfilling requirements

Interviewer: How do you think that the proposed system fulfilling all the requirements?

Candidate: Our main requirements are smooth streaming (low latency), availability, and reliability. Let’s discuss them one by one.

  1. Low Latency/Smooth streaming can be achieved through:

    • Geographically distributed cache servers.
    • High bandwidth
    • Using a distributed cache management system
    • Utilizing content delivery networks (CDNs) which make heavy use of caching and mostly serve videos out of memory. It distributes the service spatially relative to the client. Moreover, the load on the cache server should be distributed to maximize user performance.
  2. Scalability: Our design is capable of handling an average level of scaling. i.e., Certain components (like databases) will require restructuring if we scale them to cater to the needs of increasing load. Also, for disaster recovery, the existing design will have to be updated.

  3. Availablity: The system can be made available by replicating data to as many servers as possible to avoid a single point of failure. We can recover from failed servers by spanning a new virtual machine, and restoring the state.

  1. Reliability: Youtube system can be made reliable by using data partitioning and fault-tolerance techniques. For example, using consistent hashing will replace the dead server and help distribute load among servers.

Test your system designing skills

1.

Isn’t the load balancer a single point of failure (SPOF)?

Show Answer
Q1 / Q1
Did you find this helpful?

How Youtube achieves scalability, availability, good performance






Scalability

  • Load balancers to multiplex between servers
  • Adding more web servers on the fly
  • Addition of multiple storage units specific to the required data type
  • Serving from different colocation sites and CDNs
  • Separating reads/writes operations on different servers



Availability

  • Replication of content on different sites
  • Implementing disaster recovery



Low latency/Performance

  • Lighttpd for serving videos/static content
  • Caching at each layer (file system, database, cluster, application server, web server)
  • Addition of multiple storage units specific to the required data type
  • CDNs
  • Using an appropriate programming language to perform specific tasks

Tradeoffs

Interviewer: Okay, it seems like the design decisions were good enough to fulfill the requirements. But I am sure no system is perfect. What, according to you, are ...

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy