Chapter 01 · Full incident
Resource Contention in Production
A recommendations feature flag fills the 40-connection database pool, and the product page starts timing out.
The product page and the poolPractical System Design
Practical System Design
Of the book’s 14 chapters, 2 open as full incidents on a shared clock and 6 as shorter labs built around one failure. The other 6 link to the chapter itself, or to a product lab or guided lesson that practices the same idea.
Progress is saved in this browser. No sign-in.
Chapter 01 · Full incident
A recommendations feature flag fills the 40-connection database pool, and the product page starts timing out.
The product page and the pool
Chapter 02
Checkout holds a database connection while it builds its payload, and the pool runs dry under ordinary load.
Build the payload before the connection is acquired
Chapter 03
The payment provider answers after the client has given up, and the retry charges the card a second time.
One charge when the provider answers after the client has given up
Chapter 04
A slow fraud check holds every checkout request until the whole service stops answering.
A child deadline and a permit on the fraud call
Chapter 05
When product metadata falls out of the cache, every page view reads the catalog at the same moment.
One catalog read when product metadata misses
Chapter 06
How a container image pins the runtime and every dependency, so the build that passed its tests is the build that runs in production.
Read the chapter
Chapter 07
A customer saves a new address, and the next page, read from a replica, still shows the old one.
choose_read_target for the address just saved
Chapter 08
How to measure a request path with logs, metrics, and traces, and how to decide which of those signals should page someone.
Practice in Larder: Checkout became slow
Chapter 09
How timeouts, retry budgets, and bulkheads stop one failing dependency from taking its callers down with it.
Practice: A slow card provider fills its slots
Chapter 10
How canaries, feature flags, and staged rollouts make each deployment a measured change you can stop partway.
Practice in Porch: Some neighbors are sent back to sign-in
Chapter 11
Where to draw service boundaries, and the network, data, and ownership costs each new boundary adds.
Read the chapter
Chapter 12
A consumer stops between taking a message and finishing it, and the order is lost or handled twice.
Claim the message, then commit the offset
Chapter 13
Running models in production: fresh features, skew between training and serving, and rolling back when predictions drift.
Read the chapter
Chapter 14
One European catalog instance goes down, and the connection pools on the others run out.
European Catalog pools when one instance is down