The MeshMultiZoneService resource represents a group of MeshServices in a multizone deployment. While MeshService represents a service in a specific zone, MeshMultiZoneService can help us work around this boundary.
MeshMultiZoneService is assigned zone-agnostic hostnames and can load balance the traffic to multiple MeshServices.
For example, MeshService named redis
in zone east
accessible through redis.svc.east.mesh.local
and redis
in zone west
accessible through redis.svc.west.mesh.local
can be aggregated into one MeshMultiZoneService accessible through redis.mzsvc.mesh.local
.
This way, clients don’t need to pick redis from a specific zone or be updated if another redis is added in yet another zone.
The most common use case for using MeshMultiZoneService is to group MeshServices that spawn across multiple clusters with failover to another cluster in case of unavailability in the local cluster.
Contrary to MeshService, MeshMultiZoneService is not autogenerated, it has to be defined on the global control plane which is then synced to all zones. To group services, you need to select them by their labels. Each MeshService has a set of labels, some of them are placed automatically like
-
kuma.io/display-name
- original name from the zone where MeshService was created -
k8s.kuma.io/namespace
- original namespace from the zone where MeshService was created
A basic example follows to illustrate the structure:
The MeshMultiZoneService represents a destination for traffic from elsewhere in the mesh. It defines which MeshService objects serve this traffic as well as what ports are available. It also holds information about which IPs and hostnames can be used to reach this destination.