Hi folks,
We are building an edge proxy using Envoy which dynamically routes traffic over upstream clusters. We have a cluster discovery service which defines active healthy cluster hosts over which traffic can be re-routed to. We have following strategies to tackle this design:
1. We can use Strict DNS route type for service discovery. In this case, DNS resolver service will call our cluster discovery service at regular intervals and fetch active healthy hosts for the cluster. This way, Envoy will get exposed to healthy hosts and can do traffic load balancing over these hosts.
2. We use xDS streaming APIs. In this case, envoy will create a streaming connection with the xDS service and the service API will push fresh cluster configuration at regular intervals.
Now we have a couple of open questions:
1. In case of xDS APIs, what is the behavior for connection management? Do envoy drains connections created with removed hosts? Is there any mechanism to set keep alive configuration for such connections?
2. Suppose at point T1, Envoy has a cluster configuration with hosts (h1, h2, h3). After next refresh Envoy gets a new configuration with (h1, h3). Envoy will drain allotted requests to h2 and route fresh traffic to h1 and h3. Now suppose in next refresh, h2 reappears in the configuration, will Envoy reuse earlier connections for traffic routing or will it re-create new connections to do so. Is there a way to setup keep alive configuration for such connections to avoid simultaneous connection close and open on same host.
3. Is there any mapping of downstream connection to upstream connection? We want to know about this because we have high number of low TPS clients and want to understand connection management behavior.
Additional info:
Number of downstream clients : in range of 10k
Number of upstream services : 6
Average Number of hosts in each upstream service : 1000
Average TPS : 300k-400k
Please do let us know.
Thanks in advance.