Skip to content

Conversation

@voidzcy
Copy link
Contributor

@voidzcy voidzcy commented Feb 1, 2021

This change adds two parts to XdsClient for receiving configurations that support hashing based load balancing policies:

  • Each Route contains a list of HashPolicys, which specifies the hash value generation for requests routed to that Route.
  • Each Cluster resource can specify lb policy other than "round_robin" (which is the only one we support nowadays). If it is "ring_hash", it contains the configuration for mapping each RPC's hash value to one of the endpoints.

@voidzcy voidzcy changed the title xds: support hashing load balancing configurations xds: XdsClient support for hashing based load balancing Feb 1, 2021
@voidzcy voidzcy requested a review from dapengzhang0 February 1, 2021 23:31
@voidzcy voidzcy force-pushed the impl/support_xds_client_ring_hash_lb_config branch from 1559dbf to 70e6564 Compare February 10, 2021 18:53
@voidzcy voidzcy force-pushed the impl/support_xds_client_ring_hash_lb_config branch from d7b7b43 to 22cdc11 Compare February 11, 2021 20:49
@voidzcy
Copy link
Contributor Author

voidzcy commented Feb 11, 2021

Ping.

return;
}
String endpointPickingPolicy = root.result.lbPolicy;
String endpointPickingPolicy = root.result.lbPolicy();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case of ring_hash, endpointPickingPolicy should be appended with _experimental.
new PolicySelection(endpointPickingLbProvider, null) should not pass a non-null config.
It's fine if you do it when implementing the balancer.

@voidzcy voidzcy merged commit 7b70161 into grpc:master Feb 12, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2021
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.

2 participants