Circuit breaker
Published Updated
What is Circuit breaker?
A rule that temporarily stops calls to a repeatedly failing service, then allows a limited test of whether it has recovered.
A circuit breaker tracks failures and moves between allowing calls, blocking them, and allowing a few recovery probes. For example, when an email provider is down, signup can save email jobs for later instead of making every signup wait on another doomed call. Show the delayed state honestly.
When you would use it
Use it when repeated calls to an unhealthy dependency waste resources or spread delays through your app.
Common operations
- Stop calls after repeated qualifying failures.
- Allow limited recovery checks before resuming traffic.