envoyproxy/envoy

Delay ADS stream until XDS cluster warming

Open

#7.253 geöffnet am 12. Juni 2019

Auf GitHub ansehen
 (6 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C++ (5.373 Forks)batch import
api/v3bughelp wanted

Repository-Metriken

Stars
 (27.997 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8T) (378 gemergte PRs in 30 T)

Beschreibung

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