Locality Aware Load Balancing

A multi-zone deployment can enable locality aware load balancing in a particular Mesh to ensure optimal service backend routing. This feature relies on the following service tags to make decisions of selecting the destination service endpoint:

  • kuma.io/region - optional, denotes a wider region composed of several zones.
  • kuma.io/zone - automatically generate in every multi-zone deployment.
  • kuma.io/subzone - optional, denotes service grouping within a particular zone.

Enabling the Locality Aware Load Balancing

A particular Mesh that spans several regions, zones or subzones, may choose to enable locality aware load balancing as follows:

  1. apiVersion: kuma.io/v1alpha1
  2. kind: Mesh
  3. metadata:
  4. name: default
  5. spec:
  6. routing:
  7. localityAwareLoadBalancing: true

We will apply the configuration with kubectl apply -f [..].

  1. type: Mesh
  2. name: default
  3. routing:
  4. localityAwareLoadBalancing: true

We will apply the configuration with kumactl apply -f [..] or via the HTTP API.