ECS Service Connect now supports Zone-Aware routing
A look at how the new proxy-level routing behavior automatically keeps service-to-service traffic within the same Availability Zone to cut cross-AZ data transfer costs and latency. Includes steps for enabling it and measuring the impact.
Introduction
On July 1, 2026, AWS announced zone-aware routing for Amazon ECS Service Connect — a new routing capability that prioritizes traffic to endpoints within the same Availability Zone (AZ) for service-to-service communication.
If you run Amazon ECS Service Connect across multiple AZs, you may be familiar with this scenario: spreading tasks across AZs for resiliency, only to watch cross-AZ data transfer costs creep up as a side effect. This update addresses exactly that problem.
This post is for infrastructure and SRE engineers operating ECS Service Connect, as well as engineering managers interested in cloud cost optimization. It covers how zone-aware routing works, how to enable it, and how to measure its impact.
What Changed
Item | Before zone-aware routing | After zone-aware routing |
|---|---|---|
Routing behavior | Traffic distributed evenly across endpoints, regardless of AZ | Endpoints in the same AZ are prioritized |
Cross-AZ traffic | Cross-AZ calls occur frequently | Most traffic stays within the same AZ |
Cost vs. availability | Multi-AZ deployments increase cross-AZ data transfer costs as a trade-off for resiliency | Same-AZ traffic is prioritized to reduce cost while preserving multi-AZ availability |
Work required to enable | — | On by default for new services; existing services require a one-time redeployment |
The Previous Trade-off
Previously, ECS Service Connect routed traffic to destination service endpoints without any awareness of the requesting task's AZ. As a result, the more you distributed services across AZs for resiliency, the more cross-AZ traffic — and cross-AZ data transfer costs — you accumulated.
Cross-AZ data transfer on AWS typically costs around $0.01/GB in each direction, or $0.02/GB round-trip. Individually, that's a small amount, but in microservices architectures with a high volume of service-to-service calls, it adds up to a meaningful line item over a month. In short, high availability through multi-AZ deployments and cost optimization were historically in tension with each other.
Zone-aware routing is designed to eliminate that trade-off.
How It Works
Zone-aware routing uses the Envoy zone-aware routing feature built into the Service Connect proxy to route traffic based on endpoint locality. The process breaks down into four steps.

1. Endpoint Discovery
The proxy discovers all available endpoints for the destination service and their AZ placement.
2. Same-AZ Prioritization
Based on the ratio of endpoint distribution between the source (client) and destination (server) AZs, the proxy calculates what percentage of traffic can stay in the same AZ. When endpoints are evenly spread across zones, same-AZ traffic typically exceeds 80%.
3. Residual Capacity Routing
Traffic that cannot stay in the same AZ is distributed to other AZs based on their residual capacity. The proxy calculates the residual capacity of each zone and splits cross-AZ traffic proportionally among zones with positive residual capacity. As endpoints scale up or down, routing weights are recalculated in real time.
4. Overload Protection and Fallback
To prevent overloading a single AZ, the destination service needs at least 2 × the number of AZs as available endpoints — for example, at least 6 endpoints in a 3-AZ Region. Below this threshold, zone-aware routing deactivates and traffic is distributed evenly using round-robin load balancing. Routing reactivates automatically once the endpoint count exceeds the threshold. If endpoints in the same AZ become unavailable, traffic redistributes across other AZs to maintain availability.
This entire process runs within the Envoy sidecar proxy, so no application code changes or additional infrastructure are required.
Enabling and Measuring the Impact
Enabling Zone-Aware Routing
Zone-aware routing is on by default for new services that use Service Connect. For existing services, both the client and server services need a one-time redeployment to activate it. No additional configuration changes or application code changes are required.
aws ecs update-service \ --cluster <cluster-name> \ --service <service-name> \ --force-new-deployment
After the initial redeployment, routing adjusts dynamically as endpoints scale, so no further redeployments are needed.
Verifying Zone-Aware Routing
How you verify zone-aware routing depends on the container runtime.
On Amazon EC2 with the Docker Runtime
You can inspect Envoy proxy statistics inside the Service Connect agent container to confirm that zone-aware routing is active.
- Connect to the container instance with AWS Systems Manager Session Manager. __PRE_PLACEHOLDER_2__
- Open a shell in the Service Connect agent container. __PRE_PLACEHOLDER_3__
- Query zone routing statistics from the Envoy admin interface. __PRE_PLACEHOLDER_4__
A healthy deployment with zone-aware routing active shows
lb_zone_routing_cross_zone at 0:cluster.<my-service>.lb_zone_routing_cross_zone: 0cluster.<my-service>.lb_zone_cluster_too_small: 0
Metric | Description |
|---|---|
lb_zone_routing_cross_zone | Number of requests routed to an endpoint in a different AZ. A sustained value of 0 confirms all traffic stays within the same AZ. |
lb_zone_cluster_too_small | Number of times zone-aware routing was bypassed because the endpoint count was below the minimum threshold. Non-zero values right after deployment are expected and should resolve as endpoints become healthy. |
On AWS Fargate or containerd
These environments don't provide direct access to Envoy statistics, so use VPC Flow Logs (described below) to verify routing behavior instead.
Measuring the Impact
You can confirm the impact of zone-aware routing by combining Amazon VPC Flow Logs and AWS Cost Explorer. VPC Flow Logs with the
az-id field let you see, at the network level, which AZ each flow originates from and terminates in — giving you the ratio of same-AZ to cross-AZ traffic. AWS Cost Explorer lets you compare cross-AZ data transfer charges before and after enabling zone-aware routing, so you can quantify the cost savings.Beyond a single check right after redeployment, it's worth repeating this verification after scale-in or scale-out events, to confirm that dynamic routing adjustments continue to work as expected.
Where It Makes the Biggest Difference
Workloads That Benefit Most
Because zone-aware routing works automatically for any service using Service Connect, every workload benefits to some degree — but the effect is most pronounced in microservices architectures where a single request fans out across multiple services, such as product search, inventory checks, and payment processing. If each service is evenly distributed across AZs, request chains are more likely to stay within a single AZ, cutting both cross-AZ transfer costs and latency at the same time. The more calls a system makes per request, the more those small per-call savings add up.
For the same reason, workloads with high service-to-service traffic volume — latency-sensitive processing such as transaction handling, multi-tenant SaaS platforms where requests fan out across shared backend services, and multi-stage data pipelines — tend to see a similarly strong benefit.
Workloads With More Limited Impact
For architectures with relatively few service-to-service calls, or deployments that are effectively single-AZ, cross-AZ traffic is already minimal, so the cost savings will be limited. If you're running Service Connect across multiple AZs, it's still worth enabling and measuring the impact using the approach described above.
Summary
Zone-aware routing automatically prioritizes same-AZ endpoints for service-to-service traffic in ECS Service Connect, reducing both cross-AZ data transfer costs and latency.
The trade-off between cost and availability across AZs isn't unique to ECS — it's part of a broader trend across AWS services toward AZ-aware routing. What stands out about this update is that it delivers same-AZ prioritization and automatic failover without requiring any changes to application code.
If you're running ECS Service Connect across multiple AZs, a good next step is to redeploy your existing services and measure the impact using the approach described above.
References
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article