Skip to content

xdsclient: Ensure that the sum of endpoint weights within a locality does not exceed MaxUint32 #8862

@easwars

Description

@easwars

This is the documentation in the xDS proto:

  // The optional load balancing weight of the upstream host; at least 1.
  // Envoy uses the load balancing weight in some of the built in load
  // balancers. The load balancing weight for an endpoint is divided by the sum
  // of the weights of all endpoints in the endpoint's locality to produce a
  // percentage of traffic for the endpoint. This percentage is then further
  // weighted by the endpoint's locality's load balancing weight from
  // LocalityLbEndpoints. If unspecified, will be treated as 1. The sum
  // of the weights of all endpoints in the endpoint's locality must not
  // exceed uint32_t maximal value (4294967295).
  google.protobuf.UInt32Value load_balancing_weight = 4 [(validate.rules).uint32 = {gte: 1}];

See: https://github.com/envoyproxy/envoy/blob/c4106e91f8fcde8a85ddeeea5589db5b16199c0f/api/envoy/config/endpoint/v3/endpoint_components.proto#L127

Previously, we implemented a similar check for the locality weights in #5699.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions