-
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: retry overloaded requests #10847
Changes from 4 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,9 @@ 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 configure | ||
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. This is already set to a default value of 3, so folks should already be protected. I also would mention retry budgets here instead of the max_retries CB threshold. Especially since the max_retries circuit breaker already is enabled by default to a low value. This change will certainly result in a dramatic increase in retry overflows when circuit breaking occurs. 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. As an aside, I really wonder if we should at some point turn on the budgets by default vs. the hard limit. It's a much better default? 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. @tonya11en I will adjust the doc. @mattklein123 Agreed. Retry budgets are better defaults than hard limits. We should consider doing that |
||
:ref:`maximum active retries circuit breaker <arch_overview_circuit_break>` to avoid retry storms. | ||
|
||
.. _arch_overview_http_routing_hedging: | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ Changes | |
Disabled by default and can be enabled via :ref:`enable_upstream_stats <envoy_v3_api_field_extensions.filters.http.grpc_stats.v3.FilterConfig.enable_upstream_stats>`. | ||
* http: fixed a bug where the upgrade header was not cleared on responses to non-upgrade requests. | ||
Can be reverted temporarily by setting runtime feature `envoy.reloadable_features.fix_upgrade_response` to false. | ||
* router: added support for retrying requests when upstream responds with :ref:`x-envoy-overloaded <config_http_filters_router_x-envoy-overloaded_set>`. | ||
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. I would reword this to be more clear about what this change actually does. Maybe say something like:
As it reads now, it can imply that the old behavior is still intact. 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. might be good to explicitly mention circuit breakers, readers might not be aware of this header 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. I updated the doc and mentioned about using circuit breaker as a recommendation in the retry section. Do you think we should add it in the Version History as well? |
||
* tracing: tracing configuration has been made fully dynamic and every HTTP connection manager | ||
can now have a separate :ref:`tracing provider <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.provider>`. | ||
|
||
|
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.