Spring / Resilience4j Interview questions
What is the Bulkhead pattern in Resilience4j?
Bulkhead limits how many calls to a specific dependency can run at the same time, so one slow or misbehaving dependency can't consume every available thread and starve unrelated calls.
The name comes from ship design, where watertight compartments (bulkheads) stop a single hull breach from sinking the whole vessel; here, isolating concurrency per dependency stops one failure domain from taking down the rest of the application.
Resilience4j offers two implementations - a lightweight semaphore-based bulkhead that limits concurrent calls on the caller's own thread, and a thread-pool-based bulkhead that runs calls on a separate, bounded pool.
More Related questions...