Select Language:
If you’re managing multiple AWS accounts and want to lower your data transfer costs between availability zones (AZs), here are some practical steps to consider.
First, understand that Transit Gateway (TGW) typically keeps zonal affinity by default. This means that traffic from an Application Load Balancer (ALB) in one AZ usually exits the TGW and enters the destination Virtual Private Cloud (VPC) in the same AZ whenever possible. This behavior helps reduce cross-AZ data transfer costs at the TGW level because it keeps communication within the same AZ.
Next, consider your Network Load Balancer (NLB). Turning off cross-zone load balancing on your NLB can eliminate additional costs associated with cross-AZ data transfer. However, there are some trade-offs. When cross-zone load balancing is disabled:
- Each NLB node only sends traffic to targets within its own AZ.
- If one AZ has fewer targets (maybe due to scaling or failures), its targets could get more traffic per instance than others.
- If all targets in an AZ become unhealthy, the NLB in that AZ can’t route traffic to healthy targets in other AZs, which might cause service interruptions for users connected to that node.
It’s also worth noting that enabling round-robin distribution helps prevent overloading individual targets within the same AZ but doesn’t ensure an even load across multiple AZs if the number of targets varies.
For best results, follow these recommendations:
- Keep cross-zone load balancing enabled on your public-facing ALB to ensure your application stays highly available.
- Disable cross-zone load balancing on your internal NLB to save costs.
- Make sure your Auto Scaling Groups are set up to keep a balanced number of instances across AZs. This way, even if cross-zone load balancing is off, the load remains more evenly distributed.
- Regularly monitor how traffic flows and check health status across different AZs to spot any imbalances early.
- Use AWS Cost Explorer or similar tools to analyze your data transfer expenses and find potential savings.
- If your system involves high traffic or programmatic advertising, placing related components in the same AZ can significantly cut down on cross-AZ data transfer costs.
Remember, balancing cost savings and high availability depends on your application’s needs. Sometimes, accepting a little higher cost for better resilience makes more sense, so plan your setup according to your specific traffic patterns and reliability requirements.
Sources:




