- Newest
- Most votes
- Most comments
In a scenario where Cross-Zone Load Balancing is disabled, the behavior of an Elastic Load Balancer (ELB) depends on the type of ELB being used. Each load balancer node processes requests independently within its own Availability Zone (AZ), meaning it does not distribute traffic across AZs unless explicitly configured to do so.
Network Load Balancer (NLB) When Cross-Zone Load Balancing is disabled, each load balancer node only sends traffic to targets within its own AZ.
If there are no healthy targets in the AZ where the request was received, the request fails, and the client gets an error response.
The load balancer does not automatically route traffic to another AZ.
Application Load Balancer (ALB) ALB also operates within a single AZ when Cross-Zone Load Balancing is disabled.
If a load balancer node receives traffic but finds that no healthy targets exist in its own AZ, the request cannot be forwarded to another AZ, and it fails.
Unlike NLB, ALB follows a more dynamic routing process, but it still does not cross AZ boundaries unless configured.
Key Considerations If no healthy targets exist in an AZ, requests in that zone fail unless there is some external routing logic.
For better availability and fault tolerance, enabling Cross-Zone Load Balancing allows requests to be distributed across all targets in all AZs.
Enabling Cross-Zone Load Balancing ensures that load is balanced evenly across all registered targets, improving resilience and performance.
In the scenario you described, where cross-zone load balancing is disabled and the suitable target group is in a different Availability Zone (AZ) from the load balancer node that received the traffic, the behavior depends on the type of Elastic Load Balancer (ELB) you are using.
For Network Load Balancers (NLB): When cross-zone load balancing is disabled, each load balancer node distributes traffic only to the registered targets within its own AZ. If there are no healthy targets in that AZ, the load balancer node will not be able to route the traffic to targets in other AZs. This could result in the client request failing or receiving an error response.
For Application Load Balancers (ALB): Even with cross-zone load balancing disabled, an ALB will still attempt to route traffic to a healthy target in another AZ if there are no healthy targets in the original AZ. However, this is not ideal for performance and cost optimization, as it may result in increased latency and potential data transfer charges between AZs.
In both cases, to ensure optimal performance and availability when cross-zone load balancing is disabled, it's crucial to have healthy targets in each AZ where the load balancer is enabled. This approach helps maintain Availability Zone affinity, reducing latency and cross-AZ data transfer costs.
If you frequently encounter situations where traffic needs to be routed across AZs, it may be beneficial to enable cross-zone load balancing. This allows the load balancer to distribute traffic evenly across all registered targets in all enabled AZs, providing better load distribution and fault tolerance. However, keep in mind that enabling cross-zone load balancing may increase data transfer costs between AZs.
Sources
Resolve Network Load Balancer IPs that don't appear | AWS re:Post
Edit target group attributes for your Network Load Balancer - Elastic Load Balancing
Relevant content
- asked 2 years ago
- asked 2 years ago

But you can't disable Cross Zone Load Balancing for ALB, right?