The Bulkhead pattern designs safe operation into applications to ensure that a single failure cannot cause the loss of the whole application.
There are different approaches to implementing a bulkhead, which all have the same outcome. It depends on how you need to contain the fault. It's easier to explain with some examples.
Isolating Faults
Customers are divided over different container hosts, so state and session are spread across more than one physical instance. If the instance is lost, only a subset of customers are affected.
Limiting Thread Concurrency
When designing around the bulkhead pattern, assume there will be failures somewhere, which will have an impact. But try to work to contain and minimise that impact.
To that end:
- Minimise dependencies; share nearly nothing!
- Isolate faults to limit the fallout.
The pattern was in the book, Release It! by M. Nygard.