-
Notifications
You must be signed in to change notification settings - Fork 353
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
retry() request filter #674
Comments
@Traumeel thanks for the input, good idea! As for the implementation, I believe the filter should 'mark' the request flow to be retried, and the execution itself should rely on the existing loadbalancer fallback mechanism, except that in this case, it could retry the request to the same backend, and not only on dial errors. The filter could also instrument the retry mechanism for the "usual" reliability patterns. @szuecs, @lmineiro, what do you think about this approach? |
this approach would also mean that the filter only instruments the retry, regarless where it is in the filter chain. E.g. the tee() filter calls won't be retried. |
@aryszka they call a backend URL that is not loadbalanced. It's just a single route. Maybe we can have both filters, one that just does the retry and one for the loadblanced routes. |
what i meant was to support all these cases:
and I believe this should be implemented by extending the current load balancing mechanism. |
we should work on #556 to make this possible. |
Follow up is #1473 |
I have a custom Filter which injects additional headers into requests. Occasionally requests fail with 5xx. I would like to have an ability to retry failed requests and return the final successful response to a client.
I want to be able to retry the backend call on specific http status codes. For example I want to retry on status code 502. Example filter setting:
retry(3, 502)
would retry 3 times if HTTP status code is 502.The text was updated successfully, but these errors were encountered: