Index

Module 04 · System DesignThe parts, properly

Watch: Caching: the slate next to the stove →▶ Watch the video

Counting the crowd without a register (HyperLogLog, count-min, top-k)

The Slate Next to the Stove
The Slate Next to the Stove · Open board

The slate by the stove, and its second curse: the slate is small. This lesson asks it a question it has no room to answer by writing names down. The lab at the end of the story runs the counter.

Before you start. You need the stall from The chai stall that got famous (load balancing), which got famous and became ten stalls, and the slate from The slate next to the stove (caching): a small board by the stove that holds a few lines and then runs out of room. From Hashing you need one idea: a fixed recipe that stirs any input into a jumble of digits, the same jumble every time for the same input. The second read also uses a heap from Trees (BST, balancing, heaps, tries), a pile that hands you its smallest item first.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Lab

The slate is full and someone asks for something new. Which line gets erased?

Pick Longest unasked, press Add next question until all ten are asked, then drag Lines the slate holds and watch The register.

Open The slate next to the stove →

A hundred thousand different customers, and a tally board of 12 KB. How far off is its count?

Step Tallies from 16 up to 16,384, then drag Different customers, and watch Typical miss against Memory.

Open Counting the crowd →

Related paper

Review System Design →

Saved in this browser, and to your account when you sign in.