System Design: YouTube

Let's understand the basic details to design the YouTube service.

YouTube

YouTube is a popular video streaming service where users upload, stream, search, comment, share, and like/dislike videos. Large businesses, as well as individuals, maintain channels where they host their YouTube videos. YouTube allows free hosting of video content shared with users globally. YouTube is considered a primary source of entertainment, especially among youngsters, and as of 2022, it is listed as the second most viewed website after Google by WikipediaSee https://en.wikipedia.org/wiki/List_of_most_visited_websites.

YouTube popularity

Some of the reasons why YouTube became popular over the years are:

  • Simplicity: YouTube has a simple yet powerful interface.
  • Rich content: Due to its simple interface and free hosting, a large number of content creators were attracted to YouTube. Thus, the content on YouTube flourished.
  • Continuous improvement: The development team of YouTube worked relentlessly to meet the scalability requirements over time. Also, Google acquired YouTube in 2007, which added credibility and advent to its offered services.
  • Source of income: YouTube coined the partnership program where it allowed content creators to earn money with their viral content.

Apart from the above reasons, YouTube partnered up with well-established market giants like CNN and NBC to set a stronger foothold.

YouTube growth

Let’s look at some interesting statistics about YouTube and its popularity.

Since its inception in February 2005, the number of YouTube users has multiplied. As of now, there are more than 2.5 billion monthly active users of YouTube. Take a look at the chart below to see how YouTube users have increased in the last decade.

Increase in monthly active users of YouTube per year

YouTube is the second most-streamed website after Netflix. A total of 694,000 hours of video content is streamed on YouTube per minuteSource: https://www.statista.com/statistics/195140/new-user-generated-content-uploaded-by-users-per-minute/!

Now that we realize how successful the YouTube service is, let us understand how we can design it.

How will we design YouTube?

We divide the design of YouTube into five lessons:

  1. Requirements: This is where we identify the functional and non-functional requirements. We also estimate the resources required to serve millions of users each day. This lesson answers questions like how much storage space will YouTube need to store 500 hours of video content uploaded to YouTube per day?
  2. Design: In this lesson, we explain how we will design the YouTube service. We also briefly explain the API design and database schemas. We also take a peek at how YouTube’s search works.
  3. Evaluation: This lesson explains how YouTube is able to fulfill all the requirements through the proposed design. Also, how scaling in the future can affect the system and what solutions are required to deal with scaling problems.
  4. Reality is more complicated: During this lesson, we will explore different techniques YouTube employs to deliver content effectively to the client and avoid network congestions.
  5. Quiz: We reinforce major concepts by asking the learner to design Netflix’s system.

Our discussion on the usage of various building blocks in the design will be limited. It is because we have explored them in detail in the building blocks chapter.

Let’s start by understanding the requirements for designing our version of YouTube.