Bulkheads
Contain the damage.
Ships are divided into watertight compartments, called bulkheads. If one floods, the ship still floats. Software can use the same idea.

- Ships have compartments
- One floods, ship floats
- Same idea in software
Shared vs separate pools
Imagine the order service has one pool of fifty threads, for calling both payment and recommendations. Recommendations gets slow, and soon all fifty threads are stuck waiting on it. Now payments can't get a thread either. With bulkheads, each dependency gets its own small pool. A slow recommendation service can only block its own ten threads.
One shared pool
- 50 threads for allOne slow serviceEverything stuck
Bulkheads
- Payments: 40 threadsRecommendations: 10Damage contained
Bulkheads everywhere
The idea appears at many levels. Separate thread pools per dependency. Separate servers for important customers. Separate queues for urgent and bulk work. And even separate data centres. Wherever one part could exhaust a shared resource, put up a wall.
Summary
Bulkheads give each part its own resources, so one failure can't consume everything. Next, finding the single parts that could take the whole system down.
Key takeaways- Watertight compartments
- Separate pools
- Contain failures