question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

503 Service Unavailable for open circuit breaker

See original GitHub issue

Detailed 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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
whiskeysierracommented, May 3, 2019

but it prevents due to previous timeout

That’s the most dominant type, yes. But circuit breakers can be opened for numerous other reasons, doesn’t have to be timeouts.

your service that is unavailable but in fact you’re are (or maybe partially)

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:

This service is really not available since (at least) one critical dependency is not available.

0reactions
whiskeysierracommented, Jul 28, 2019

Failsafe 2.1.1 adds support for retrieving the delay configuration: https://github.com/jhalterman/failsafe/blob/master/CHANGES.md#211

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found