The Bulkhead pattern improves system resilience by dividing a system into isolated sections, similar to the watertight compartments in a ship, so a failure in one section can't sink the whole system.
If the Search feature of an e-commerce site suddenly gets overloaded by a traffic spike, bulkheading its resources separately means the Checkout and Account pages, which have their own resource allocations, remain fast and available even while Search is struggling.
// Search gets its own small "compartment"; when it is full, extra search
// calls fail fast instead of using up threads needed by checkout
@Bulkhead(name = "search", fallbackMethod = "searchBusy")
public List<Product> search(String query) {
return searchClient.search(query);
}
private List<Product> searchBusy(String query, Throwable ex) {
return List.of(); // show "try again" instead of blocking the server
}
# application.yml
resilience4j:
bulkhead:
instances:
search:
max-concurrent-calls: 20 # at most 20 searches at the same time
max-wait-duration: 0 # don't queue; reject immediately
checkout:
max-concurrent-calls: 50A concise interview answer is
By giving each part of the system its own dedicated resources instead of a shared pool, the Bulkhead pattern makes sure a problem in one area — like an overloaded or failing service — stays contained there instead of dragging down unrelated parts of the system. It's one of the simplest and most effective tools for improving overall resilience in a distributed system.
Last updated: 1 November 2026
Previous question: What is the Circuit Breaker pattern?
Next question: Can you explain the Retry and Backoff patterns?