tonic/xds: wire up lbv2 as a feature - #2722
Conversation
|
Found one potential issue with the new LB's readiness logic that needs verification:
I think to fix it we either need to do eviction in |
poll_ready calls poll_discovery, so IMO it is poll_discovery's responsibility to handle cluster removal / adding back. Currently this is not working because cluster discovery is not re-established. I have a TODO here: https://github.com/gu0keno0/tonic/blob/39cda4e88d2e532581c3b9749c7150bb726c513f/tonic-xds/src/xds/lb_discovery.rs#L17-L19 . This is also an issue for tower-lb as well: https://github.com/grpc/grpc-rust/blob/master/tonic-xds/src/xds/cluster_discovery.rs#L179 . If cluster_watch is closed (I think cluster removal triggers it today), cluster discovery dies. So both tower-lb and lbv2 are under the same issue. |
Add tonic-xds' own LB module as a feature
Motivation
Tower's LB is limited. We cannot support advanced xds features such as customized load balancer and outlier detection on top of it.
We have been developing tonic-xds' own LB for a while, and this PR make it ready for future consumptions.
We will still need to wire up xds configs for OD and RingHash, those can be done in future PRs.
Solution
Added the wire-up modules to make the tonic-xds' LB usable behind a feature flag.