Cross-Zone Load Balancing
Cross-Zone Load Balancing is an essential concept to ensure high availability and fault tolerance of your application deployed across multiple Availability Zones. By enabling Cross-Zone Load Balancing, the traffic is distributed evenly not just among instances in a single Availability Zone but across all registered instances in multiple Availability Zones. This helps you achieve better resource utilization, high availability, and consistent performance for your applications. In addition, it prevents service disruptions and uneven distribution of traffic due to issues in a single Availability Zone, ensuring that your application continues to run smoothly even during an outage in one of the zones.
Guide: Cross-Zone Load Balancing in AWS
What is Cross-Zone Load Balancing?
It is a method that allows the load balancer to distribute traffic equally across all registered instances in all enabled Availability Zones, not just the one where the request was initially directed.
How does it work?
Whenever your load balancer receives a request, it routes the request to the backend instance with the smallest load in any Availability Zone. This is determined by Connection Draining, a process from the Elastic Load Balancing feature.
Exam Tips: Answering Questions on Cross-Zone Load Balancing
1. Understanding: Understand the basic working of Cross-Zone Load balancing. Know that it does not restrict traffic to the same zone. Traffic is distributed evenly across instances in all zones.
2. Comparisons: Be able to compare Cross-Zone with single-zone load balancing. Know the differences clearly and when to use each.
3. Enable/Disable: Know how to enable and disable the feature, and the situations where you would want to do so.
4. Costs: Understand the costs that apply when Cross-Zone load balancing is enabled.
5. Key Features: Be aware of key features - such as Connection Draining and Sticky Sessions that are associated with ELB and can be related to questions on Cross-Zone load balancing.
AWS Certified Solutions Architect - Cross-Zone Load Balancing Example Questions
Test your knowledge of Cross-Zone Load Balancing
Question 1
You are seeing uneven workload distribution between instances within the same Availability Zone due to a Network Load Balancer. What should you do?
Question 2
You operate an Application Load Balancer (ALB) with cross-zone load balancing enabled across two Availability Zones. After a recent change, requests routed to one target group show increased 5xx errors and high latency, and several targets in that group are marked unhealthy by health checks. What should you do to quickly restore performance?
Question 3
An application runs in a single AWS Region behind a Network Load Balancer (NLB) deployed across three Availability Zones. Cross-zone load balancing on the NLB is currently disabled. Due to an EC2 capacity shortfall, the Auto Scaling group in one Availability Zone has only half as many healthy targets as the other two. Users whose traffic is routed to that Availability Zone report higher latency. Without adding capacity immediately, what should you do to reduce the latency?