liveBook · Manning

Bulkhead

As explained in Grokking Software Architecture

A resilience pattern that isolates resource capacity into compartments so a failure or slowdown in one area does not exhaust resources elsewhere.

The bulkhead pattern isolates system resources—such as thread pools, memory, or database connections—into compartments. If one service slows down or fails, it cannot consume capacity needed by the rest of the application. section 10.3.3

A slow payment service

Suppose an application has 100 processing threads. Assigning 80 to general web traffic and 20 to the Payment API means a stalled payment service can disrupt checkout without preventing users from browsing. section 10.3.3

A bulkhead contains resource exhaustion; it does not keep the affected service working. Unlike a Circuit Breaker, which cuts a failing connection, it limits how much capacity that failure can occupy. section 10.10 section 10.3.3

Figure 10.5 The Bulkhead Pattern. Just like a ship's watertight compartments, isolating your resources ensures that when one service floods and fails (Checkout), the damage is completely contained. The rest of your application remains healthy and afloat.

See how isolated compartments contain a checkout failure while the rest of the application stays healthy. section 10.3.3

How Grokking Software Architecture covers it

How deep it goes
Defines hard resource limits and illustrates thread-pool isolation, without detailing implementation tooling.
Examples
Uses watertight ship compartments and a 100-thread application split between web traffic and a Payment API.
What you can do after
Understand how isolating resource capacity can keep unaffected application functions available during a service failure.
How it connects
Contrasts resource isolation with the Circuit Breaker's connection-cutting protection against cascading failures.

Also explained in

Compare how 3 books explain bulkhead →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.