upstream: allow clusters to skip waiting on warmup for initialization#17179
upstream: allow clusters to skip waiting on warmup for initialization#17179junr03 merged 7 commits intoenvoyproxy:mainfrom junr03:skip-dns-block
Conversation
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
| // or :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`. | ||
| // If true, server startup blocks on async DNS resolution. If false, server will complete | ||
| // initialization whether or not DNS resolution has completed. Defaults to true. | ||
| google.protobuf.BoolValue wait_for_dns_on_init = 54; |
There was a problem hiding this comment.
open to a different name.
There was a problem hiding this comment.
how about wait_for_warm_on_init or some thing like that so that it can be applied for EDS/other type of clusters if needed in future and need not be dns cluster specific?
There was a problem hiding this comment.
+1, I think this seems like a useful general option and we could just have it apply everywhere.
There was a problem hiding this comment.
Great point. Will update. I can can land this PR for only dns based clusters, and if there is appetite I can do a subsequent one for other cluster types.
mattklein123
left a comment
There was a problem hiding this comment.
Thanks LGTM with some small comments.
/wait
| // DNS resolution configuration which includes the underlying dns resolver addresses and options. | ||
| core.v3.DnsResolutionConfig dns_resolution_config = 53; | ||
|
|
||
| // Optional configuration for having server init block on cluster warm-up. Currently, only applicable for |
There was a problem hiding this comment.
It's not only "server init" that this applies to. In practice it would also apply to CDS updates. I would make that more clear here and below.
There was a problem hiding this comment.
Agreed. Let me know if this is better.
| * bootstrap: added :ref:`dns_resolution_config <envoy_v3_api_field_config.bootstrap.v3.Bootstrap.dns_resolution_config>` to aggregate all of the DNS resolver configuration in a single message. By setting one such configuration option ``no_default_search_domain`` as true the DNS resolver will not use the default search domains. And by setting the configuration ``resolvers`` we can specify the external DNS servers to be used for external DNS query. | ||
| * cluster: added :ref:`dns_resolution_config <envoy_v3_api_field_config.cluster.v3.Cluster.dns_resolution_config>` to aggregate all of the DNS resolver configuration in a single message. By setting one such configuration option ``no_default_search_domain`` as true the DNS resolver will not use the default search domains. | ||
| * cluster: added :ref:`host_rewrite_literal <envoy_v3_api_field_config.route.v3.WeightedCluster.ClusterWeight.host_rewrite_literal>` to WeightedCluster. | ||
| * cluster: added :ref:`wait_for_warm_on_init <envoy_v3_api_field_config.cluster.v3.Cluster.wait_for_warm_on_init>`, which allows clusters to not-block server initialization on warmup. It is true by default, which preserves existing behavior. Currently, only applicable for DNS-based clusters. |
There was a problem hiding this comment.
Same comment here about server init.
| respect_dns_ttl_(cluster.respect_dns_ttl()), | ||
| resolve_timer_( | ||
| factory_context.dispatcher().createTimer([this]() -> void { startResolve(); })), | ||
| wait_for_warm_on_init_(PROTOBUF_GET_WRAPPED_OR_DEFAULT(cluster, wait_for_warm_on_init, true)), |
There was a problem hiding this comment.
I would move this into the cluster base class, even if not yet implemented for the other clusters.
|
(Matt, since you're reviewing this one, I'll remove myself as API reviewer.) |
|
/retest |
|
Retrying Azure Pipelines: |
|
/retest |
|
Retrying Azure Pipelines: |
* main: listener: match rebalancer to listener IP family type (envoyproxy#16914) jwt_authn: implementation of www-authenticate header (envoyproxy#16216) listener: reset the file event in framework instead of listener filter doing itself (envoyproxy#17227) Small typo fix (envoyproxy#17247) Doc: Clarify request/response attributes are http-only (envoyproxy#17204) bazel/README.md: add aspell comment (envoyproxy#17072) docs: Fix broken URL links in HTTP upgrades doc (envoyproxy#17225) remove the wrong comment on test (envoyproxy#17233) upstream: allow clusters to skip waiting on warmup for initialization (envoyproxy#17179) JwtAuthn: support completing padding on forward jwt payload header (envoyproxy#16752) remove support for v2 UNSUPPORTED_REST_LEGACY (envoyproxy#16968) metrics service: fix wrong argument arrange on MetricsServiceSink (envoyproxy#17127) deps: update cel-cpp to 0.6.1 (envoyproxy#16293) Add ability to filter ConfigDump. (envoyproxy#16774) examples: fix Wasm example. (envoyproxy#17218) upstream: update host's socket factory when metadata is updated. (envoyproxy#16708) Signed-off-by: Garrett Bourg <bourg@squareup.com>
…envoyproxy#17179) Commit Message: upstream -- allow clusters to skip waiting on warmup for initialization Additional Description: this reduces server startup time, but might cause initial 500s for requests made on unresolved clusters. Further work might be needed there if operators use this new config option. Risk Level: low - new config option. Default uses legacy behavior. Testing: added unit tests Docs Changes: added. Release Notes: updated Signed-off-by: Jose Nino <jnino@lyft.com> Signed-off-by: chris.xin <xinchuantao@qq.com>
…envoyproxy#17179) Commit Message: upstream -- allow clusters to skip waiting on warmup for initialization Additional Description: this reduces server startup time, but might cause initial 500s for requests made on unresolved clusters. Further work might be needed there if operators use this new config option. Risk Level: low - new config option. Default uses legacy behavior. Testing: added unit tests Docs Changes: added. Release Notes: updated Signed-off-by: Jose Nino <jnino@lyft.com>
Commit Message: upstream -- allow clusters to skip waiting on warmup for initialization
Additional Description: this reduces server startup time, but might cause initial 500s for requests made on unresolved clusters. Further work might be needed there if operators use this new config option.
Risk Level: low - new config option. Default uses legacy behavior.
Testing: added unit tests
Docs Changes: added.
Release Notes: updated