The whole machine on one canvas. Every stage in the story below is one box on it.
Before you start. You need to know that a website is a program running on rented computers, and that it keeps its facts in a database, a filing cabinet a program can write to and search. One more thing, and the whole lesson hangs off it: a video is enormous next to a row of text. It is a file of many millions of bytes, a byte being one small unit of storage, so YouTube spends its life moving bytes and only occasionally facts about bytes.
Lesson 110 of 115 in System Design
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.
Or start free: a free account opens lessons 2 and 3 of every track.
In this lesson
The lopsided fact everything else follows from
2006: nine engineers, a hundred million views a day, and the first shard
2010: the database was fine, the way of running it was not
One upload becomes dozens of files, and a better codec is a loan
A billion hours a day, served from a rack inside your internet provider
2012: the reward changed from clicks to watch time
13 March 2007: a billion-dollar lawsuit, answered as a search
The official cheat: keep only the guarantees somebody needs
The videos
Terms it explains: shard, transcoding, Google Global Cache, watch time, fingerprint, 3.3×, 1,157 views a second, $25.4 million per employee, 100 to 300 million, 23 a second, 370×.