- Newest
- Most votes
- Most comments
Cross-zone load balancing is described in the AWS documentation.
- If you enable cross-zone load balancing then requests are distributed evenly across all registered targets in all Availability Zones. This might be desirable if you're trying to protect against a scenario where all hosts in an Availability Zone are down.
- There will be slightly higher latency for cross-zone requests. It will be minimal and probably a much smaller part than the latency between the client and the load balancer but it will be there. You can check the latency between the Availability Zones by using
ping
or other networking tools.
Whether you turn cross-zone load balancing on or off depends on your requirements for latency and for availability.
From a latency perspective, the risk you incur in not enabling cross-zone load balancing is that requests to NLBs in an AZ where there are no healthy instances would timeout and be retried by the client, thus increasing the average latency experienced by the clients.
Another aspect of enabling cross-zone load balancing is that it increases networking costs: all traffic that goes from a NLB in one AZ to a target in a different AZ will incur a network transfer charge. If you have 3 AZ, this will be equivalent to 2/3rd of the traffic.
One way to minimize the impact on latency without using cross-zone load balancing is to use Zonal Shift. You can read more about best practices with Zonal Shift
Relevant content
- asked 3 years ago
- asked 6 months ago
- asked 9 months ago
- Accepted Answerasked 5 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 months ago