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

Circuit breaker improvement #2660

Merged
merged 1 commit into from
Nov 7, 2019
Merged

Circuit breaker improvement #2660

merged 1 commit into from
Nov 7, 2019

Conversation

tbuchaillot
Copy link
Contributor

@tbuchaillot tbuchaillot commented Nov 6, 2019

Tyk's Circuit Breaker only works for 500 errors. This is pretty limiting. e.g. the breaker will not trip for failed upstreams.

This PR fixes that in order to break the circuit for any 5XX errors or if RoundTrip returns an error.

Copy link
Contributor

@matiasinsaurralde matiasinsaurralde left a comment

Choose a reason for hiding this comment

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

Looks good

t.Run("Extended Paths", func(t *testing.T) {
BuildAndLoadAPI(func(spec *APISpec) {
UpdateAPIVersion(spec, "v1", func(v *apidef.VersionInfo) {
json.Unmarshal([]byte(`[
Copy link
Member

Choose a reason for hiding this comment

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

Feels like formatting error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@buger
Copy link
Member

buger commented Nov 7, 2019

Apart from small formatting issue looks goood

@buger buger merged commit f6d25e6 into master Nov 7, 2019
@buger buger deleted the circuit-breaker-improvement branch November 7, 2019 17:52
@furkansenharputlu
Copy link
Contributor

/release to release-2.9

@tykbot
Copy link

tykbot bot commented Nov 13, 2019

Working on it! Note that it can take a few minutes.

@tykbot
Copy link

tykbot bot commented Nov 13, 2019

Still working...

tykbot bot pushed a commit that referenced this pull request Nov 13, 2019
Tyk's Circuit Breaker only works for 500 errors. This is pretty limiting. e.g. the breaker will not trip for failed upstreams.

This PR fixes that in order to break the circuit for any 5XX errors or if RoundTrip returns an error.

(cherry picked from commit f6d25e6)
@tykbot
Copy link

tykbot bot commented Nov 13, 2019

@furkansenharputlu Succesfully merged f6d25e695f4d77a3fd37b0c64f4ce800e935eeae to release-2.9 branch.

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