SYSTEM DESIGN GUIDE Design Lab

Practice · interactive

Design Lab

Pick a scenario, drag components onto the canvas and connect them. Then check your design: you'll get a rank, what you got right, what's missing and why, and the design an interviewer would hope to see.

See it in action: sizing

A photo-sharing app is about to hit its daily peak. Watch what the right sizing, and the wrong one, does to it.

Traffic–

p99 latency–

Errors–

Cost / month–

Press a button above: one run where it goes well, one where it goes wrong.

The brief

  • A photo-sharing site growing from 1k to 1M daily users.
  • Reads outnumber writes 50 : 1; photos are a few MB each.
  • It must keep working when any single server dies.

Components

Drag onto the canvas, or tap to add.

Drag components here.
Then pull from a box's ● handle to another box to connect them.

Connect Click a line to remove it. Your canvas is saved in this browser.

Capacity calculator

How big does this design need to be? Set the traffic and the work each request does; the calculator sizes the servers, load balancers, database, cache and workers. It reads your canvas too: the database and load balancer you picked, and whether there's a cache.

Traffic
Work per request
Data
Files, jobs and connections
Assumptions

Database limits per node depend on the database you pick on the canvas (for example PostgreSQL ≈ 5k writes/s per primary, Cassandra ≈ 10k writes/s per node). They're rough planning numbers, not benchmarks.

Your estimate first

How many of each will this design need at peak? Guess, then reveal. Way too many and it blasts (wasted money); way too few and it melts down (overloaded).