-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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: retry overloaded requests #10847
Changes from 9 commits
3801e21
a1bf01b
d22b56e
acf6885
6bb3c6a
e648a0d
69fc2da
899d4a6
556ae19
998f8ed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -122,8 +122,10 @@ headers <config_http_filters_router_headers_consumed>`. The following configurat | |||||
:ref:`retry priority <envoy_api_field_route.RetryPolicy.retry_priority>` can be | ||||||
configured to adjust the priority load used when selecting a priority for retries. | ||||||
|
||||||
Note that retries may be disabled depending on the contents of the :ref:`x-envoy-overloaded | ||||||
<config_http_filters_router_x-envoy-overloaded_consumed>`. | ||||||
Note that Envoy retries requests when :ref:`x-envoy-overloaded | ||||||
<config_http_filters_router_x-envoy-overloaded_set>` is present. It is recommended to either configure | ||||||
:ref:`retry budgets (preferred) <envoy_api_field_cluster.CircuitBreakers.Thresholds.retry_budget>` or set | ||||||
:ref:`maximum active retries circuit breaker <arch_overview_circuit_break>` to an appropriate value avoid retry storms. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
.. _arch_overview_http_routing_hedging: | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -281,10 +281,6 @@ RetryStatus RetryStateImpl::shouldHedgeRetryPerTryTimeout(DoRetryCallback callba | |
} | ||
|
||
bool RetryStateImpl::wouldRetryFromHeaders(const Http::ResponseHeaderMap& response_headers) { | ||
if (response_headers.EnvoyOverloaded() != nullptr) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you remove this from the O(1) header map? I think we don't need this anymore as the header can be added by string reference where it is added currently? |
||
return false; | ||
} | ||
|
||
// We never retry if the request is rate limited. | ||
if (response_headers.EnvoyRateLimited() != nullptr) { | ||
return false; | ||
|
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.
Is this header documented anywhere else? I think we still should document it. I think it does still make sense to send it as downstream may want to track it, but we should document somewhere?
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.
I checked earlier- it's explained further down in the same file.