-
-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Circuit Breaker #2843
Labels
enhancement
New feature or request
Comments
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the problem this feature would solve?
This pattern is very common in distributed systems as it solves cascading failures and allows services to recover instead of sending requests that are bound to fail. Personally, I faced an issue with on a project with a 3rd party integration that locked your account if you sent multiple authentication requests. A circuit breaker pattern solved this issue for me.
What is the feature you are proposing to solve the problem?
Here's how a circuit breaker pattern works:
The Circuit Breaker typically has three states:
For a more detailed explanation Martin Fowler's blog post is useful: https://martinfowler.com/bliki/CircuitBreaker.html
What alternatives have you considered?
I've worked with a custom circuit breaker as well in a couple of languages but generally in the Node ecosystem I've used Opossum: https://github.com/nodeshift/opossum. However, this feature would be very useful in this project, since it already has a retry capability, the next step could be to add more resilience patterns. I've seen libraries in other languages that have a collection of resiliency patterns including in .NET and Java but haven't seen that in Typescript yet.
The text was updated successfully, but these errors were encountered: