What is a circuit breaker?
BeginnerConceptRelease Engineering & Reliability Patterns
Answer
A circuit breaker wraps calls to a dependency and tracks failures. States:
- Closed: calls pass through; failures are counted.
- Open: after failures exceed a threshold, calls fail immediately (or use a fallback) without hitting the dependency, for a cool-down period.
- Half-open: after cool-down, a few trial calls are allowed; success closes the circuit, failure opens it again.
It protects the dependency from extra load and the caller from waiting on timeouts. Implementations: Resilience4j (Java), Polly (.NET), Envoy/Istio outlier detection and connection pool limits.
More on Release Engineering & Reliability Patterns
Why are releases the biggest source of incidents, and what does SRE do about it?BeginnerWhat is a canary release?BeginnerWhat is progressive delivery?IntermediateShow an Argo Rollouts canary with a Prometheus analysis.AdvancedBlue-green vs canary: when do you choose each?IntermediateWhat are feature flags and how do they improve reliability?Beginner