Software engineering · Operations & workflows
Circuit breaker.
A mechanism that temporarily stops calls to a failing dependency and later probes for recovery.
Useful when repeated failures waste resources or spread disruption.
“Add a circuit breaker around the recommendation service and show a fallback while it is open.”
A closer look
The breaker observes failures. Once a threshold is reached, it rejects calls for a period rather than continuing to hit the dependency. A later probe or limited trial can determine whether normal calls should resume. Choose the failure threshold, timeout, and fallback deliberately.
Put it to work
“Open the breaker after repeated timeouts, then allow a small recovery probe after thirty seconds.”
A useful distinction
A retry attempts an operation again. A circuit breaker can stop attempts entirely while a dependency is unhealthy.