The Bulkhead pattern isolates different parts of a system into separate resource pools to prevent failure in one area from affecting others. It's named after ship bulkheads that prevent water from flooding the entire vessel. Key differences from Circuit Breaker: Bulkhead Pattern:
Protection: Stops calls to failing external services
Detection: Reacts after failures are detected
Scope: Protects against external dependency failures
Strategy: Request blocking Example scenario:
// Bulkhead: Separate thread pools for different operations
ThreadPoolExecutor paymentPool = new ThreadPoolExecutor(5, 10, ...);
ThreadPoolExecutor notificationPool = new ThreadPoolExecutor(3, 6, ...);
// Circuit Breaker: Protect calls to external payment service
CircuitBreaker paymentServiceBreaker = new CircuitBreaker();
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.