π‘οΈ AWS ELB Load Balancer Cross-Zone Load Balancing is not enabledπ’
- Contextual name: π‘οΈ Load Balancer Cross-Zone Load Balancing is not enabledπ’
- ID:
/ce/ca/aws/elb/load-balancer-cross-zone
- Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY
- Policy Categories:
RELIABILITY
,PERFORMANCE
Logicβ
- π§ prod.logic.yamlπ’
Similar Policiesβ
Descriptionβ
Descriptionβ
This policy identifies AWS ELB Load Balancers (Classic, Application, Network, and Gateway) that are not configured to use cross-zone load balancing. Cross-zone load balancing helps distribute traffic evenly across all registered instances in all enabled Availability Zones, reducing the need to maintain an equal number of instances per zone and improving application resilience.
Rationaleβ
Enabling cross-zone load balancing allows the load balancer to route requests evenly across all available instances, regardless of the Availability Zone where the request originated. Without this feature, traffic is distributed only among instances in the same Availability Zone as the request, which can lead to uneven load distribution if instances are not balanced across zones or if traffic patterns vary.
Impactβ
If cross-zone load balancing is disabled, the application becomes more susceptible to performance degradation and service disruptions. An outage or heavy traffic in one Availability Zone could overload its instances while leaving instances in other zones underutilized, resulting in poor performance, reduced fault tolerance, or complete service unavailability.
... see more
Remediationβ
Remediationβ
Enable Cross-Zone Load Balancingβ
From Command Lineβ
For Network and Gateway Load Balancersβ
Enable cross-zone load balancing by updating the load balancer attributes:
aws elbv2 modify-load-balancer-attributes \
--load-balancer-arn {{load-balancer-arn}} \
--attributes "Key=load_balancing.cross_zone.enabled,Value=true"For Classic Load Balancersβ
aws elb modify-load-balancer-attributes \
--load-balancer-name {{load-balancer-name}} \
--load-balancer-attributes "{\"CrossZoneLoadBalancing\":{\"Enabled\":true}}"For Application Load Balancersβ
Since cross-zone load balancing is always enabled at the load balancer level, enable it for associated target groups instead:
aws elbv2 modify-target-group-attributes \
--target-group-arn {{target-group-arn}} \
--attributes "Key=load_balancing.cross_zone.enabled,Value=true"