Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 12 · System Design · The questions that keep coming up · about 18 min to read

Watch: The shard key that lied: why a correct rule went wrong on its own
▶ VideoPlay it as a journeyTutor comes with a plan

One building, many tenants (design for customers who must not see or slow each other)

The Shard Key That Lied
The Shard Key That Lied · Open board

One company outgrowing the slice of the database it was assigned, which is the last section of this lesson drawn out.

Before you start. You need the six steps from Design the Whole Thing (the interview, assembled): ask, estimate, API, data, design, bottlenecks. You need Splitting the ledger (sharding), where one big table was cut into slices by a key, because the slice a customer lands in is half of this lesson. And Rate limiting: the token bucket gave you the rate limit, a rule that says how many requests one caller may make, which comes back here with a customer’s name on it.

Lesson 72 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.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • June 2009: 55,000 customers and no table of their own
  • The flat number on everything: pooled, with a tenant id
  • A building for every family: siloed
  • The pool leaks speed, not data: the noisy neighbour
  • A tap for every flat: the per-tenant quota
  • The tenant that outgrows the pool: moving to a building of its own
  • 1. Requirements
  • 2. Out of scope, said out loud
  • 3. Targets
  • 4. Estimates that change the design
  • 5. Entities and API
  • 6. Storage, with the trade said plainly
  • 7. The design, one requirement at a time
  • 8. Deep dives
  • 9. What each level adds
  • 10. The follow-up: one customer wants its own database and its own region

Terms it explains: tenant, tenant id, pooled, siloed, noisy neighbour, slots, quota, token bucket, bridged, Common mistakes, Signing up, Metering, Moving a tenant.

Related paper

Review System Design