Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xds: Use wrr_locality LB and support load_balancing_policy in Cluster #9141

Merged
merged 6 commits into from May 6, 2022

Conversation

temawi
Copy link
Contributor

@temawi temawi commented May 3, 2022

Instead of providing round robin or least request configurations directly, ClientXdsClient now wraps them in a WRR locality config. Also support generating the configuration using the new load_balancing_policy field in the xDS Cluster message.

ClusterResolverLoadBalancer passes this configuration directly to PriorityLoadBalancer to use as the endpoint LB policy it provides to ClusterImplLoadBalancer. A new ResolvedAddresses attribute is also set that has all the locality weights. This is needed by WrrLocalityLoadBalancer when it configures WeightedTargetLoadBalancer.

Instead of providing round robin or least request configurations directly, ClientXdsClient now wraps them in a WRR locality config.

ClusterResolverLoadBalancer passes this configuration directly to PriorityLoadBalancer to use as the endpoint LB policy it provides to ClusterImplLoadBalancer. A new ResolvedAddresses attribute is also set that has all the locality weights. This is needed by WrrLocalityLoadBalancer when it configures WeightedTargetLoadBalancer.
@temawi temawi force-pushed the use_wrr_locality branch 3 times, most recently from 20de2e8 to 2d1cc73 Compare May 3, 2022 03:19
@temawi temawi changed the title Use wrr locality xds: Use wrr_locality LB and support load_balancing_policy in Cluster May 3, 2022
@temawi temawi marked this pull request as ready for review May 3, 2022 03:57
@temawi temawi requested a review from ejona86 May 3, 2022 03:57
Renames the LegacyLoadBalancerConfigFactory to just LoadBalancerConfigFactory and gives it responsibility for both the legacy and the new LB config mechanism.

The new configuration mechanism is explained in gRFC A52: grpc/proposal#298
@temawi temawi force-pushed the use_wrr_locality branch 3 times, most recently from aa1c867 to 2faa080 Compare May 6, 2022 18:29
@temawi temawi merged commit c20904d into grpc:master May 6, 2022
@temawi temawi deleted the use_wrr_locality branch May 6, 2022 21:55
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants