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 waiting

Bounds resource usage.

Retry

Repeat transient failures

Requires careful idempotency and backoff.

Circuit breaker

Stop calling unhealthy dependency

Prevents cascading failure.

Bulkhead

Isolate resources

Prevents one dependency from exhausting shared capacity.