What is the Bulkhead pattern in microservices?

Answer

The Bulkhead pattern isolates resources (thread pools, connection pools, semaphores) used for different downstream services so that a failure or slowdown in one does not exhaust resources for others. Named after ship bulkheads that partition the hull into watertight compartments so that flooding one section does not sink the ship. In practice, if Service A calls Service B and Service C, you assign separate thread pools to each — if Service B becomes slow and fills its thread pool, calls to Service C continue unaffected. Resilience4j and Hystrix implement bulkheads via thread pool isolation or semaphore isolation. Bulkheads are a key tool for preventing cascading failures in high-traffic microservices systems.