Circuit Breakers and Bulkheads
Resilience Patterns
A circuit breaker stops repeatedly calling a failing dependency after failures cross a threshold. It enters an open state, allowing the dependency time to recover, then gradually probes it again.
Bulkheads isolate resource pools so one dependency cannot consume all available resources.
For example, a service may maintain separate concurrency limits for payment APIs and analytics APIs. A failing analytics service should not prevent payment requests from being processed.
Resilience Patterns
Timeout:
Stop waitingBounds resource usage.
Retry:
Repeat transient failuresRequires careful idempotency and backoff.
Circuit breaker:
Stop calling unhealthy dependencyPrevents cascading failure.
Bulkhead:
Isolate resourcesPrevents one dependency from exhausting shared capacity.