In Kong Mesh, zones are abstracted away, meaning that your data plane proxies will find services wherever they run.
This way you can make a service multi-zone by having data planes using the same kuma.io/service
in different zones. This gives you automatic fail-over of services in case a specific zone fails.
Let’s look at how a service backend
in zone-b
is advertised to zone-a
and a request from the local zone zone-a
is routed to the remote
service in zone-b
.
When the new service backend
joins the mesh in zone-b
, the zone-b
zone control plane adds this service to the availableServices
on the zone-b
ZoneIngress
resource.
The kuma-dp
proxy running as a zone ingress is configured with this list of
services so that it can route incoming requests.
This ZoneIngress
resource is then also synchronized to the global control plane.
The global control-plane will propagate the zone ingress resources and all policies to all other zones over Kong Mesh Discovery Service (KDS), which is a protocol based on xDS.
The zone-b
ZoneIngress
resource is synchronized from the global control
plane to the zone-a
zone control plane.
Requests to the availableServices
from zone-a
are load balanced between local instances and remote instances of this service.
Requests send to zone-b
are routed to the zone ingress proxy of zone-b
.
For load-balancing, the zone ingress endpoints are weighted with the number of instances running behind them. So a zone with 2 instances will receive twice as much traffic than a zone with 1 instance.
You can also favor local service instances with locality-aware load balancing.
In the presence of a zone egress, the traffic is routed through the local zone egress before being sent to the remote zone ingress.
When using transparent proxy (default in Kubernetes),
Kong Mesh generates a VIP,
a DNS entry with the format <kuma.io/service>.mesh
, and will listen for traffic on port 80. The <kuma.io/service>.mesh:80
format is just a convention.
VirtualOutbounds
s enable you to customize the listening port and how the DNS name for these services looks.
A zone ingress is not an API gateway. It is only used for cross-zone communication within a mesh. API gateways are supported in Kong Mesh gateway mode and can be deployed in addition to zone ingresses.