SOLID & Design Patterns Interview Question #93

What is the Bulkhead Pattern?

DDD Boundaries, Resilience, Caching & Practical ASP.NET Core Design Mid-Level Intermediate

Quick Interview Answer

The Bulkhead Pattern isolates resources so failure or heavy load in one part of a system does not consume all capacity needed by other parts. The name comes from compartments in ships that limit flooding.

Detailed Explanation

The Bulkhead Pattern isolates resources so failure or heavy load in one part of a system does not consume all capacity needed by other parts. The name comes from compartments in ships that limit flooding.

Software bulkheads can use separate thread pools, connection pools, queues, concurrency limits, or service instances. The objective is fault isolation rather than simply adding more resources.

Code Example

// Conceptual isolation:
Payment calls  -> concurrency limit 20
Search calls   -> concurrency limit 50
Reports        -> separate worker queue