- TechOps Examples
- Posts
- Understanding Cross Zone Load Balancing
Understanding Cross Zone Load Balancing
TechOps Examples
Hey — It's Govardhana MK 👋
Along with a use case deep dive, we identify the remote job opportunities, top news, tools, and articles in the TechOps industry.
IN TODAY'S EDITION
🧠 Use Case
Understanding Cross Zone Load Balancing
🚀 Top News
👀 Remote Jobs
Sporty Group is hiring a DevOps Engineer
Remote Location: Worldwide
Supabase is hiring a Cloud Platform / Site Reliability Engineer
Remote Location: Worldwide
📚️ Resources
🛠️ TOOL OF THE DAY
bananas - A simple and easy to use screen sharing tool for Mac, Windows, and Linux (without the need for an account or any server infrastructure).
🧠 USE CASE
Understanding Cross Zone Load Balancing
If you’re working with cloud infrastructure, you’ve probably configured a load balancer before.
Most of you likely know what cross zone load balancing does, but for those hearing about it for the first time, or just looking to solidify your understanding, here’s a simple explanation.
In a multi AZ setup, cross zone load balancing ensures that traffic is distributed evenly across all targets, regardless of the availability zone (AZ) they’re in.
Without it, a load balancer typically sends traffic to targets only within the AZ where the traffic originates. This can lead to imbalances if one AZ has more targets or more traffic than the others.
Why Cross Zone Load Balancing Is Important?
Here’s the practical side of things:
It ensures all your targets work more efficiently.
It handles uneven traffic patterns by spreading the load across all targets, not just the ones in the busiest AZ.
All instances contribute evenly, reduces the need to over-provision targets in each AZ.
Types of Load Balancers Supporting Cross Zone Load Balancing
Application Load Balancer (ALB):
Enabled by default and free of charge.
Ensures even distribution of HTTP(S) traffic across all registered targets.
Supports multiple target groups, allowing fine grained routing.
Network Load Balancer (NLB):
Disabled by default but can be enabled.
Useful for high throughput, low latency Layer 4 traffic.
Charges apply for inter AZ traffic when Cross Zone Load Balancing is enabled.
Classic Load Balancer:
Disabled by default but can be enabled and free of charge.
AWS recommends migrating to ALB or NLB.
How to Enable Cross Zone Load Balancing in AWS
Login to the AWS Console
Navigate to EC2 → Load Balancers.
Select Your Load Balancer.
Go to Attributes or Settings Based on the Type:
ALB/NLB: Toggle Cross Zone Load Balancing in the Attributes tab.
CLB: Enable cross-zone load balancing under Attributes.
For Target Groups (ALB/NLB only):
Confirm the target group inherits the setting from the load balancer.
If necessary, explicitly enable or disable cross-zone load balancing at the target group level.
Save Changes and test the load balancer to ensure it works as expected.
aws elb describe-load-balancer-attributes --load-balancer-name techops-loadbalancer
Practical Caveats for you
Analyze inter AZ traffic patterns before enabling Cross Zone Load Balancing for NLB. (check this useful resource)
Use CloudWatch metrics to observe traffic distribution across AZs.
Always provision multiple targets across AZs, even with Cross Zone Load Balancing enabled.
Configure health checks for quick identification and removal of unhealthy targets.
Linux commands I used 99% of the time:
𝗕𝗮𝘀𝗶𝗰𝘀:
1. `man` - Skim through manual for better understanding.
2. `nano` / `vim` - Use nano for basic editing, vim for advanced editing.
3. `ls -l` - List files with detailed info.
4. `ssh` - Connect to remote machines securely.
5.… x.com/i/web/status/1…— Govardhana Miriyala Kannaiah (@govardhana_mk)
7:58 AM • Nov 30, 2024
You may even like: