Multi-zone architecture

Uses: Kong Mesh
Related Documentation
Minimum Version
Kong Mesh - 3.0

A multi-zone deployment connects several zones to the same global control plane. Applications keep calling service hostnames. The mesh finds the zone where the destination runs and carries the request across the zone boundary.

Components of a multi-zone deployment

The global control plane, the zone control planes, and the proxies each have a different job:

Component

What it does

Carries application traffic

Global control plane Stores global resources, sends them to the zones over KDS, and keeps an inventory of every zone. No
Zone control plane Finds the workloads in its zone, exchanges resources with the global control plane over KDS, and sends configuration to the local proxies over xDS. No
Application proxy (sidecar) Intercepts the traffic of its workload and applies routing, mTLS, authorization, and other policies. Yes
Mesh-scoped zone ingress and zone egress Carry the traffic of one mesh into and out of the zone. Yes
flowchart LR
    K["Global control plane"]

    subgraph Z1["zone1"]
      C1["Zone control plane"]
      A1["orders<br/>sidecar"]
    end

    subgraph Z2["zone2"]
      C2["Zone control plane"]
      I2["Zone ingress"]
      A2["payments<br/>sidecar"]
    end

    K <-.->|KDS| C1
    K <-.->|KDS| C2
    C1 -.->|xDS| A1
    C2 -.->|xDS| I2
    C2 -.->|xDS| A2
    A1 --> I2
    I2 --> A2

KDS and xDS carry configuration only. The solid arrows show the application request, which never passes through a control plane.

The orders sidecar in zone1 connects directly to the zone ingress in zone2. The zone ingress then forwards the request to payments. A zone egress in zone1 doesn’t change this path, because it carries only traffic to MeshExternalService destinations.

Mesh-scoped zone proxies

Each zone runs a zone ingress for every mesh that receives traffic from other zones, and optionally a zone egress. Other zones find the zone ingress through a MeshZoneAddress. The zone ingress forwards the encrypted connection without decrypting it, so it doesn’t need a workload identity, but the zone egress does. The zone control plane adds the kuma.io/listener-zoneingress: enabled or kuma.io/listener-zoneegress: enabled label to each zone proxy, and a policy selects the zone proxies with that label in its top-level targetRef. Not every policy supports zone proxies, so check the policy reference first.

For deployment, addressing, and policy details, see Mesh-scoped zone proxies.

Identity and trust across zones

A cross-zone request succeeds only when three conditions are met:

  1. A MeshIdentity gives a workload identity to the application sidecars in both zones. Without it, the zone control plane doesn’t send the caller the endpoints of the other zone. See Make ingress reachable from other zones.
  2. Each zone trusts the certificate authority (CA) that signed the certificates of the other zone. With autogenerated CAs, each zone has its own CA and trust domain, and you distribute the trust yourself. See Multi-zone meshes.
  3. A MeshTrafficPermission allows the SPIFFE ID of the caller from the other zone. See Match caller identities.

Service hostnames across zones

Each zone control plane creates a MeshService for each local service and sends it to the other zones through the global control plane. A caller reaches a service in one specific zone with a hostname that includes the zone, such as payments.NAMESPACE.svc.zone2.mesh.local. For how the control plane builds these hostnames, see HostnameGenerator.

To give callers one hostname for a service that runs in several zones, create a MeshMultiZoneService on the global control plane. Callers reach it with a hostname of the form NAME.mzsvc.mesh.local, and MeshLoadBalancingStrategy decides which zone receives each request. For more information, see MeshMultiZoneService.

A hostname doesn’t grant access or establish trust.

Observability across zones

The control planes configure telemetry, but they don’t collect it. Each proxy sends or exposes its own metrics, traces, and access logs:

  • MeshMetric exposes or exports metrics. Prometheus or an OpenTelemetry collector collects them from each zone.
  • MeshTrace makes the proxies create spans. Applications must forward the trace context between their own requests to produce one end-to-end trace.
  • MeshAccessLog sends access logs to a file, a TCP endpoint, or an OpenTelemetry collector.

To build a dashboard for every zone, send the data of all zones to the same backends, and label it with the mesh, zone, workload, and service.

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!