A circuit breaker protects a microservice from repeatedly calling a failing upstream service. It acts like an advanced timeout: after a request fails, it stops sending new requests and fails them immediately. section 11.4.7
The circuit follows a small state machine:
- On: normal requests pass through to the upstream resource. section 11.4.7
- Off: new requests fail immediately because the upstream service is known to be failing. section 11.4.7
- Recovery check: after a configurable delay, the breaker checks the upstream service and returns to On when normal operation resumes. section 11.4.7
Failing upstream service
A request to a particular HTTP resource fails, so the breaker switches Off. Subsequent callers receive an immediate failure instead of waiting for another timeout. After its configured delay, the breaker checks the service and permits requests again when it has recovered. section 11.4.7
Use the state-transition figure to trace normal requests, failure detection, immediate rejection, recovery checks, and the return to normal traffic. section 11.4.7
Circuit breakers are harder to implement than timeouts or retries, but they prevent repeated slow failures and are useful when an upstream dependency is persistently unhealthy. section 11.4.7 section 11.6





