Skip to content

xds: Incorrect load reporting when using pick first as locality-routing policy #11434

@ejona86

Description

@ejona86

ClusterImplLoadBalancer assumes all addresses for a subchannel are in the same locality:

Locality locality = args.getAddresses().get(0).getAttributes().get(
InternalXdsAttributes.ATTR_LOCALITY); // all addresses should be in the same locality

That is the case when pick_first is being used as an endpoint-picking policy. But when pick_first is being used for affinity cross-locality (instead of ring_hash), that is wrong and can assign the load to the wrong locality.

The PickFirstLeafLoadBalancer doesn't have this problem, because it uses a separate subchannel for each address. But it also is not the default (again).

b/349186137

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions