envoyproxy/envoy

Add address or remove address to a multiple addresses listener without draining all the connections

Open

#23.431 aperta il 11 ott 2022

Vedi su GitHub
 (6 commenti) (0 reazioni) (1 assegnatario)C++ (5373 fork)batch import
area/listenerhelp wanted

Metriche repository

Star
 (27.997 star)
Metriche merge PR
 (Merge medio 8g) (378 PR mergiate in 30 g)

Descrizione

Currently, when adding a new address or removing an existing address from a multiple addresses listener, it will lead to a new listener generated, and draining the old listener, then all the existing connections will be drained.

There is a requirement from the istio side https://github.com/istio/istio/pull/41248. For headless service, Istio will create a listener for each endpoint original. Now with the multiple addresses listener, they can create a single listener for all the endpoints. But when the endpoints are changed, Istio needs to add or remove address to the multiple addresses listener and look for not draining all the existing connections which are on the unchanged address.

For adding address, it should be able done by enabling ConnectionHandleImpl to add ActiveListener for a new address to an existing listener.

For removing address, it should be able done by enabling ConnectionHandleImpl to stop and remove ActiveListener for a specific address on a listener. And ListenerManager will be able to drain an ActiveListener on a specific address instead of the whole listener.

Guida contributor