Bulkhead
Large systems share resources.
Thread pools, database connections, HTTP clients, memory, CPU — all of these are finite. When one subsystem consumes too much of them, other parts of the system feel the strain.
Imagine a reporting feature that runs expensive queries. Under heavy load, it exhausts the shared database connection pool. Meanwhile, critical API requests begin to fail because no connections are available.
The original problem was localized. The impact was not.
The Bulkhead pattern exists to prevent this kind of spillover.
Isolating Compartments
The name comes from ship design. Bulkheads divide a ship into compartments. If one section floods, the others remain sealed.
In software, bulkheads isolate resources.
Instead of sharing one large thread pool across all tasks, separate pools are created for different categories of work. Instead of one shared connection pool, critical paths may have dedicated connections. Instead of a single queue, workloads may be partitioned.
Each subsystem operates within its own limits.
If one area becomes overloaded or fails, it consumes only its allocated resources. The rest of the system continues functioning.
Containing the Blast Radius
Without isolation, failure propagates through shared infrastructure. A surge in one component can starve others.
With bulkheads, the blast radius shrinks.
A misbehaving background job might exhaust its own thread pool, but it cannot consume the threads reserved for request handling. A slow integration cannot monopolize the connection pool needed by core services.
Capacity planning becomes explicit. Limits are defined up front rather than discovered during incidents.
The Cost of Isolation
Bulkheads introduce configuration complexity. Resource pools must be sized thoughtfully. Under-provisioning wastes capacity in one area while another sits idle. Over-provisioning can leave insufficient resources for critical paths.
Isolation makes capacity planning more deliberate.
The system designer must understand workload characteristics and failure scenarios. That understanding informs how resources are partitioned.
The tradeoff is operational clarity.
Where It Fits
The Bulkhead pattern is particularly useful in systems that mix critical and non-critical workloads, background processing with interactive requests, or integrations with unpredictable performance.
It is less necessary in small systems where resource contention is minimal.
As systems grow, shared pools become hidden coupling points. Bulkheads turn those implicit couplings into explicit boundaries.
Designing for Containment
Failures are inevitable.
Resource exhaustion is common under stress.
Bulkheads acknowledge that no subsystem should be able to take the entire ship down with it.
Isolation does not eliminate failure.
It ensures that when one compartment floods, the others remain afloat.