How to control the frequency that Envoy polls Pilot via xDS


I saw discoveryRefreshDelay in istio-proxy container args, but don’t know how to set it from yaml or chart files, and that doesn’t seem to get into any config file (envoy-rev0.json) for Envoy.
So how to set the xDS call frequency and what is the default value?
Thank you!



I think the default is 10s. You may be able to tweak it from PILOT_DEBOUNCE_MAX.




So I may need to understand how Envoy and Pilot interact with each other first.
Is it Envoy periodically calling Pilot to pull data, or is it Pilot periodically broadcasting (push) to all Envoy pods?
I thought it was a pull model, that is why I thought the interval is controlled by Envoy. But I checked PILOT_DEBOUNCE_MAX parameter, it seems to be one on Pilot side, suggesting a Pilot push model? So which one is correct>



Envoy holds a long running gRPC streaming connection to Pilot where Pilot can push updates as it sees on open stream.



Thank you for the reply! Further questions then:
how long is this “long running gRPC streaming”? Does it last the whole life time of the Envoy from the moment Envoy sidecar is created? If so, then it’s truly a push model from Pilot. If client (Envoy) may chose to close the connection for a while then reconnect when it feels the need to get updates, then that is a fixed model where client initiates the stream periodically and Pilot asynchronously sends update events. In such case, I would image the client (Envoy) has to send it’s state (when was my last updates) in the request. If the Pilot push is full picture everytime rather than just the new events, then this state is not necessary.
Either case, this “lasting gRPC streaming” is new to me. Does it scale to thousands of pods? Maybe I’m old school but for one component (Pilot) to hold thousands of concurrent connections all the times is strange. Maybe gRPC is very efficient in that regards.

1 Like