Home›Design›System design 5: real systems
System design · Chapter 5

Real systems, one tap at a time

Chapters 1 to 4 built the pieces one at a time. Here they meet in systems people use every day. Each X-ray follows one tap from the phone to the database, told as a story, and links back to the design docs that explain each part.

Three stories

Pick a system and follow one tap

Instagram: open your feed, post a photoFrom three engineers on AWS to three data centers: stateless Django, sharded PostgreSQL, Cassandra.Design docs behind it
Social feed · Search · Media and catalog
Open the X-ray
Amazon: add to cart and check outA cart that must always take a write: Dynamo, then DynamoDB on Prime Day.Design docs behind it
Store orders and inventory · Product catalog · Accounts and sessions
Open the X-ray
A digital bank (Monzo): send moneyPayments that must never be lost or doubled: services, a ledger, and Kafka.Design docs behind it
Payments and ledgers · Audit and event logs · Accounts and sessions
Open the X-ray
How to read them

Same layers, different priorities

Instagram optimizes reads

Feeds are built ahead of time, photos come from the edge, and most reads never reach a database.

Amazon optimizes for always taking the write

The cart accepts a write even when machines fail, and sorts out conflicts later.

The bank optimizes for never losing money

Every step that moves money is durable before anyone is told it worked, and every entry balances.

Next · chapter 6The big callsDecisions and anti-patterns, with the numbers← Chapter 4: Pick the store
Part 3 of 4 · Design · 28 pagesAll pages

Which database does my application need? What kind of application data goes in which database, and why, as design docs, plus the anti-patterns and the decisions behind them.