Circuit breaker
A circuit breaker stops calls to a failing service and later allows limited probe calls to check recovery.
A circuit breaker protects an application from continually calling a failing dependency. It evaluates selected failures and decides whether further calls may pass through. After a defined waiting period, limited probe calls can check whether the service has recovered.
Three states with different permissions
In closed, calls pass normally. In open, they are rejected without being forwarded to the affected service. half-open permits only limited probe calls; their results determine whether calls are blocked again or normal operation resumes.
In a fictional customer portal, the PDF reporting service fails. The open circuit breaker prevents new calls to that service, and the portal shows that it is temporarily unavailable. This does not itself save a report job in a queue or repair the service.
The team defines failure types, the evaluation window, threshold, waiting period and fallback behaviour. A timeout limits the duration of one call; a retry starts another attempt. The circuit breaker decides whether a call is forwarded. These mechanisms can work together, but their rules need to be coordinated.
Sources
Related terms
- Retry strategyA retry strategy defines which failures to retry, the waiting intervals and the limit on further attempts.
- Exponential backoffExponential backoff multiplies the waiting interval between retries, up to a configured limit.
- Server-sent eventsServer-sent events carry text notifications from server to client over HTTP, for example about the progress of a background job.
- Entity tagAn ETag identifies a particular representation version of an HTTP resource and supports conditional reads or changes.
- Cross-Origin Resource SharingCORS controls browser access to responses across origin boundaries. It replaces neither API login nor permission checks.
- Electronic Data InterchangeEDI transfers structured business documents between systems. Format, partner profile, data mapping and responses need to agree.
Your project with ASES
Describe your project to us. We will get back to you with an initial assessment.