Compare · 21 system design decisions
The diagram gets you through the first ten minutes of a system design interview. The next forty are why you chose Redis over the database, and what happens when Redis says OK and then forgets. 21 decisions, one online shop, every product drawn against the same problem, every claim checked against the vendor's own documentation.
20 are Premium. One membership, $65 a year, opens all of them and everything else on the site. See what Premium includes
Not sure which decision is yours? Find your symptom
Come with one question
"Why Redis and not the database?" "Which copy still has the order when Virginia dies a second after it said committed?" Every section on a family page answers one question like that. Open the section you need and leave. You never have to read a whole family.
The shape is the answer, the product is the example
Anyone can draw a cache box and a queue box. A staff engineer says which shape is inside the box, what it gives up, and where its promise stops: one key, one partition, one region. That one sentence separates two candidates who drew the same diagram.
Know what breaks before they ask
Every family shows the failure the interviewer is about to raise: the primary that said OK and died, the retry that puts the old price back, the shard that answered late with HTTP 200. Walk in having seen it, or meet it for the first time in the room.
Each family is three symptoms. Find yours, then open that family.
Caches
Distributed key-value
Work queues
Search
Relational databases
Distributed SQL
Document databases
Warehouses
Real-time analytics (OLAP)
Time series
Graph databases
Vector retrieval
Object and file storage
Stream processing
Durable workflows
Coordination
Real-time delivery
Traffic routing
Architecture styles
Unique IDs
Multi-region data
Every page follows the same order: the products · why the family exists · the shapes in the family · questions to ask first · the life of one message, copy or request · five problems, drawn for each product · how each one is built · when it fails · more things to compare · guarantees, and where they stop · two scenarios, before and after · the decision table · the interview answer · sources. Open Caches to see all of it, free.
Caches
You cache product pages, or keep login sessions that every server reads. Which fast store fits your data, how fresh it must be, and what it must survive?
5 problems drawn2 scenariosthe interview answer
Distributed key-value
Two billion orders, and the app almost always asks for one customer's records. DynamoDB, Cassandra, ScyllaDB or Bigtable? And what do I give up: joins, transactions, or a fresh read?
5 problems drawn2 scenariosthe interview answer
Work queues
My checkout must not wait for the email to be sent. Which queue or stream, and does it keep the history?
5 problems drawn2 scenariosthe interview answer
Search
Emma types 'ketle' in the search box. Which search engine, or can the database do it?
5 problems drawn2 scenariosthe interview answer
Relational databases
Orders, customers and stock in tables that must never half-save. Postgres or MySQL? Run it myself, or let RDS, Aurora or AlloyDB run it? And what happens when one machine isn't enough?
5 problems drawn3 scenariosthe interview answer
Distributed SQL
One Postgres primary is not enough any more. Spanner, CockroachDB, YugabyteDB, TiDB or Aurora DSQL? Or do I split the database I have into pieces?
5 problems drawn2 scenariosthe interview answer
Document databases
Each order is a tree: customer, address, products, payment. MongoDB? Firestore? Or JSON in the Postgres I have?
5 problems drawn2 scenariosthe interview answer
Warehouses
Finance wants revenue by product over the last year's 400 million order lines. Where can that scan run without slowing checkout?
5 problems drawn2 scenariosthe interview answer
Real-time analytics (OLAP)
Every product page shows 'bought 12 times in the last hour', 2,000 times a second. Which store answers that from events seconds old?
5 problems drawn2 scenariosthe interview answer
Time series
300 servers report checkout latency every 15 seconds. The on-call screen wants the last 5 minutes, and finance wants 13 months. Which store?
5 problems drawn2 scenariosthe interview answer
Graph databases
The kettle page wants 'bought this, also bought', and fraud wants to know if an order is six steps from a banned account. Which store follows the links?
5 problems drawn2 scenariosthe interview answer
Vector retrieval
'Products like the kettle' over 2 million products, in stock and under $50, 500 times a second. Which store holds the embeddings, the numbers a model turns each product into?
5 problems drawn2 scenariosthe interview answer
Object and file storage
5 million product images and an invoice PDF per order. Where do the files live, and how does Emma's browser get one?
5 problems drawn2 scenariosthe interview answer
Stream processing
Count orders per card in any five minutes and keep stock current for two million products. What happens when an order arrives late or a worker dies?
5 problems drawn2 scenariosthe interview answer
Durable workflows
Order 881 was charged, then the server restarted. How does fulfilment carry on, and what if the payment reply was lost?
5 problems drawn2 scenariosthe interview answer
Coordination
Worker 7 froze for 40 seconds holding order 881, and worker 9 took over. Which lock stops worker 7's late write?
5 problems drawn2 scenariosthe interview answer
Real-time delivery
Emma's tracking page must show 'shipped' within a second, on 20,000 open tabs. Which one pushes it, and what happens when her phone drops?
5 problems drawn2 scenariosthe interview answer
Traffic routing
One of three checkout instances hangs. Checkout v2 must reach 5 percent of users first, and a script floods the API. Which product stands in front and sends each request to the right server?
5 problems drawn2 scenariosthe interview answer
Architecture styles
Two teams keep blocking each other's releases. Split the shop into services, or not?
5 problems drawn2 scenariosthe interview answer
Unique IDs
Two servers must create order ids at the same time without talking to each other. Which id?
5 problems drawn2 scenariosthe interview answer
Multi-region data
We're adding a second region. Which regions may write, and what happens when one is gone?
5 problems drawn2 scenariosthe interview answer
The free family shows the depth. Premium opens the other 20, plus the interview prep, drills and cheat sheets across the site. $65 a year. One price, no tiers.
Not sure yet? Read Caches first. It is the whole method, free.