System Design Interview

Wrap Up

Wrap up 1 min readLesson 4 of 4

In this chapter, we presented the architecture design for video streaming services like YouTube. If there is extra time at the end of the interview, here are a few additional points:

  • Scale the API tier: Because API servers are stateless, it is easy to scale API tier horizontally.

  • Scale the database: You can talk about database replication and sharding.

  • Live streaming: It refers to the process of how a video is recorded and broadcasted in real time. Although our system is not designed specifically for live streaming, live streaming and non-live streaming have some similarities: both require uploading, encoding, and streaming. The notable differences are:

  • Live streaming has a higher latency requirement, so it might need a different streaming protocol.

  • Live streaming has a lower requirement for parallelism because small chunks of data are already processed in real-time.

  • Live streaming requires different sets of error handling. Any error handling that takes too much time is not acceptable.

  • Video takedowns: Videos that violate copyrights, pornography, or other illegal acts shall be removed. Some can be discovered by the system during the upload process, while others might be discovered through user flagging.

Congratulations on getting this far! Now give yourself a pat on the back. Good job!

Reference materials

  1. YouTube by the numbers: https://www.omnicoreagency.com/youtube-statistics/
  2. 2019 YouTube Demographics: https://blog.hubspot.com/marketing/youtube-demographics
  3. Cloudfront Pricing: https://aws.amazon.com/cloudfront/pricing/
  4. Netflix on AWS: https://aws.amazon.com/solutions/case-studies/netflix/
  5. Akamai homepage: https://www.akamai.com/
  6. Binary large object: https://en.wikipedia.org/wiki/Binary_large_object
  7. Here’s What You Need to Know About Streaming Protocols: https://www.dacast.com/blog/streaming-protocols/
  8. SVE: Distributed Video Processing at Facebook Scale: https://www.cs.princeton.edu/~wlloyd/papers/sve-sosp17.pdf
  9. Weibo video processing architecture (in Chinese): https://www.upyun.com/opentalk/399.html
  10. Delegate access with a shared access signature: https://docs.microsoft.com/en-us/rest/api/storageservices/delegate-access-with-shared-access-signature
  11. YouTube scalability talk by early YouTube employee: https://www.youtube.com/watch?v=w5WVu624fY8
  12. Understanding the characteristics of internet short video sharing: A youtube-based measurement study. https://arxiv.org/pdf/0707.3670.pdf
  13. Content Popularity for Open Connect: https://netflixtechblog.com/content-popularity-for-open-connect-b86d56f613b

Finished reading?

Mark it complete to track your progress.