Skip to content
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

Implement Circuit Breaker Pattern #448

Open
rizalgowandy opened this issue Aug 22, 2021 · 5 comments
Open

Implement Circuit Breaker Pattern #448

rizalgowandy opened this issue Aug 22, 2021 · 5 comments

Comments

@rizalgowandy
Copy link

It will be awesome if resty has a built-in circuit breaker that can be enabled.
This feature protects from too many open files and much more accidents.

Reference: https://github.com/eapache/go-resiliency

@jeevatkm
Copy link
Member

@rizalgowandy Thanks for reaching out and recommending a new feature for Resty.

@mstrYoda
Copy link

Is there any progress on this? It would be quite good to have a built-in cb.

@taoli0515
Copy link

Bump on this - built in circuit breaker would be very helpful

@jeevatkm jeevatkm added this to the v3.0.0 Milestone milestone Oct 1, 2023
@segevda
Copy link
Contributor

segevda commented Dec 18, 2024

Hi @jeevatkm,
If it's ok I'd like to take a shot at implementing this.

I was thinking about having the breaker at the client level, and count errors around the client.execute() calls.

Still debating if the CB should only count http.Do errors (i.e counting remote server issues only) or all errors (which include resty internal or middleware errors).

All input is appreciated 🙂

@jeevatkm
Copy link
Member

@segevda Thanks for reaching out. I'm currently working on the SSE feature. If you want to take a shot, please use branch v3.

We should consider only http.Client.Do errors; request preparation and validation errors should not be considered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants