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

Allow only system failures to trigger circuit breaker #667

Merged
merged 4 commits into from Nov 7, 2019

Conversation

argouber
Copy link
Contributor

@argouber argouber commented Nov 1, 2019

When the downstream client call fails due to application errors, we should not count that towards
the circuit breaker threshold. The systems are still behaving okay.

For tchannel, it is the "system errors"
For http downstream, we sorta count 5xx as system failures. This may not always be the case, but is there a better way?
For grpc downstream, all exceptions are system errors, so things should be okay.

When the downstream client call fails due to application errors, we should not count that towards
the circuit breaker threshold.  The systems are still behaving okay.

For tchannel, it is the "system errors"
For http downstream, we sorta count 5xx as system failures. This may not always be the case, but is there a better way?
For grpc downstream, all exceptions are system errors, so things should be okay.
@coveralls
Copy link

coveralls commented Nov 2, 2019

Coverage Status

Coverage increased (+0.009%) to 69.673% when pulling bd23040 on argo/hystrix-tweak into e670e4d on master.

Copy link
Contributor

@rpatali rpatali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

besides the cosmetic change, LGTM.

codegen/templates/http_client.tmpl Show resolved Hide resolved
codegen/templates/tchannel_client.tmpl Outdated Show resolved Hide resolved
err = hystrix.DoC(ctx, "{{$clientID}}", func(ctx context.Context) error {
res, err = req.Do()
return err
res, realErr = req.Do()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would choose variable name as clientErr rather than realErr. real vs unreal it looks like from variable name currently

Copy link
Contributor

@abhishekparwal abhishekparwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@argouber argouber merged commit 9efa10e into master Nov 7, 2019
@argouber argouber deleted the argo/hystrix-tweak branch May 19, 2020 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants