Interview Prep/SRE & Reliability/Release Engineering & Reliability Patterns

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.

All SRE & Reliability questions

More on Release Engineering & Reliability Patterns