503 Service Unavailable for open circuit breaker
See original GitHub issueDetailed Description
Translate Failsafe’s CircuitBreakerOpenException
into a probem response with a 503 Service Unavailable
status.
Context
A CircuitBreakerOpenException
that bubbles all the way up the web layer of an application can technically safely translated into a service unavailable response, since clients may be able to honor this.
Possible Implementation
- Optional dependency to Failsafe 2.0
- Make sure it’s really optional at runtime
- Translate to
503 Service Unavailable
- No special problem type needed
- Optionally, set
Retry-After
header based onCircuitBreaker#getDelay
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
503 Service Unavailable - HTTP - MDN Web Docs
The HyperText Transfer Protocol (HTTP) 503 Service Unavailable server error response code indicates that the server is not ready to handle ...
Read more >Power Monitoring Expert - Web applications 503 Service ...
Issue When opening Web Applications, "503 Service Unavailable" error is displayed. Product Line Power Monitoring Expert 9.0 Environment Web ...
Read more >Circuit Breaker pattern - Azure Architecture Center
A service can return HTTP 429 (Too Many Requests) if it is throttling the client, or HTTP 503 (Service Unavailable) if the service...
Read more >Istio circuit breaker not opening the circuit on ... - Stack Overflow
Istio circuit breaker not opening the circuit on consecutiveErrors when downstream service throws 5xx (500, 502, 503, 504) errors.
Read more >OCAPI Hook Circuit Breaker 22.10
The circuit breaker's status changes to open . · For 60 seconds, any calls to the failing extension point return an HTTP Status...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s the most dominant type, yes. But circuit breakers can be opened for numerous other reasons, doesn’t have to be timeouts.
Not really. If a
CircuitBreakerOpenException
bubbles up all the way from an HTTP Client/Gateway to a Resource/Controller (vocabulary stolen from https://martinfowler.com/articles/microservice-testing/#anatomy-modules) then this service is not available, since there was no fallback of any kind which makes this particular dependency a critical one.So my reasoning for
503 Service Unavailable
is the following:Failsafe 2.1.1 adds support for retrieving the delay configuration: https://github.com/jhalterman/failsafe/blob/master/CHANGES.md#211