-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
router: add envoy-ratelimited retry policy #12201
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks this looks good to me and is not controversial at all IMO, happy to add this given that there is now a need. Just one minor nit
@@ -290,9 +293,9 @@ RetryStatus RetryStateImpl::shouldHedgeRetryPerTryTimeout(DoRetryCallback callba | |||
} | |||
|
|||
bool RetryStateImpl::wouldRetryFromHeaders(const Http::ResponseHeaderMap& response_headers) { | |||
// We never retry if the request is rate limited. | |||
// We retry our own rate limited requests only when the envoy-ratelimited policy is in effect. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Our own" implies to me that this envoy instance rate limited the request, but its likely going to be another Envoy instance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's a good point. I'll rephrase this to make it clear we're talking about an upstream envoy.
Adds new retry policy envoy-ratelimited that retries responses containing the header x-envoy-ratelimited. Signed-off-by: Martin Matusiak <[email protected]>
Signed-off-by: Martin Matusiak <[email protected]>
Signed-off-by: Martin Matusiak <[email protected]>
4d4b1ee
to
b1f12c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Adds new retry policy envoy-ratelimited that retries responses containing the header x-envoy-ratelimited. Signed-off-by: Martin Matusiak <[email protected]> Signed-off-by: Kevin Baichoo <[email protected]>
Adds new retry policy envoy-ratelimited that retries responses containing the header x-envoy-ratelimited. Signed-off-by: Martin Matusiak <[email protected]> Signed-off-by: chaoqinli <[email protected]>
This PR implements a new retry policy that retries a request if the response contains the header
x-envoy-ratelimited
.This is PR (1/2) that addresses issue #12200. See also the design document: https://docs.google.com/document/d/1NSzrx3-KsAFs0ObaLQZUVIt9O4PZv3mXi3Lm7LNzmZE/edit?usp=sharing
Signed-off-by: Martin Matusiak [email protected]
Risk Level: Low
Testing: New unit test added.
Docs Changes: added
Release Notes: added