envoyproxy / envoyproxy/envoy

Delay ADS stream until XDS cluster warming

Open
#7,253 6 comments 0 reactions 0 assignees View on GitHub
api/v3 bug help wanted
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 22h
Merged PRs (30d)
430

Description

Currently the ADS stream is started immediately after static load completes:

https://github.com/envoyproxy/envoy/blob/master/source/common/upstream/cluster_manager_impl.cc#L283

When used with STRICT_DNS, this means that the gRPC stream keeps attempting to connect until DNS resolves, which can exacerbate startup delays due to DNS issues: the stream will continuously attempt to connect, building up the retry backoff counter. By the time DNS finally resolves, the next attempt might be scheduled several seconds into the future. As a result, a 5 second DNS delay (eg due to a timeout) might result in delaying startup by >10s.

While this slowdown isn't a major issue, it's caused short-ish DNS issues to cause significant deployment delays for us.

Conceptually the fix sounds like it would be to defer ADS stream start until the associated cluster warms (eg wait for first DNS resolution), but I'm not sure how easy it would be to express that with the current init helper.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.