Add address or remove address to a multiple addresses listener without draining all the connections
#23,431 opened on Oct 11, 2022
Repository metrics
- Stars
- (27,997 stars)
- PR merge metrics
- (Avg merge 8d) (378 merged PRs in 30d)
Description
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.