AWS Network Load Balancer now supports removing Availability Zones
Dayanantha Shanmugaradnam
1.Introduction
Amazon Web Services (AWS) has announced a significant enhancement to the Network Load Balancer (NLB)—the ability to remove Availability Zones (AZs) from an existing load balancer configuration. This new feature enhances flexibility for businesses adapting to changing operational needs. Previously, once an AZ was enabled for a Network Load Balancer, it could not be removed without creating a new load balancer instance. With this update, AWS addresses scenarios such as mergers, acquisitions, data residency compliance, and capacity adjustments, allowing organizations to reconfigure their application stacks more efficiently.
Removing an AZ involves updating the list of enabled subnets via the AWS Management Console, CLI, or API. However, AWS advises caution, as this operation can disrupt active connections. When an AZ is removed, its associated Elastic Network Interface (ENI) is deleted, active connections are terminated, and zonal IPs and DNS names are released.
This feature is now available across all AWS commercial regions and AWS GovCloud (US) regions. For detailed guidance on safely using this capability, AWS recommends consulting their product documentation and blog posts.
2.What Has Changed?
With this feature update:
You can deregister subnets and remove associated AZs from your NLB dynamically.
The load balancer will automatically stop routing traffic to the removed AZ.
This operation can be performed through the AWS Management Console, AWS CLI, or AWS SDKs.
3.Key Benefits
1. Flexibility in Resource Management
Dynamically adjust your AZ configuration based on application traffic, cost considerations, or resource availability.
Ideal for temporary scaling or migrating workloads across AZs.
2. Cost Optimization
Reduce costs by disabling underutilized AZs without provisioning a new NLB.
Efficiently manage Elastic IP addresses (EIPs) and resources tied to those AZs.
3. Simplified Operations
Avoid the complexity of recreating load balancers to change AZ configurations.
Streamline maintenance activities like zone-specific updates or decommissioning.
4. Business Continuity and Resilience
Proactively remove failing AZs from your load balancer’s rotation for improved application resilience.
Helps maintain service uptime during AZ-specific disruptions.
4.How It Works
Identify the AZ/Subnet to Remove:
Use the AWS Console or CLI to view the current NLB configuration.
Deregister Targets (Optional):
If desired, deregister targets in that AZ from the target group.
Remove Subnet:
Navigate to the Subnets section of your NLB configuration and remove the desired subnet.
Confirm Changes:
The NLB will stop routing traffic to that AZ immediately.
Monitor:
Use CloudWatch metrics to verify the impact and ensure smooth traffic redirection.
5.Considerations
For internet-facing Network Load Balancers, the subnets that you specify must have at least 8 available IP addresses. For internal Network Load Balancers, this is only required if you let AWS select a private IPv4 address from the subnet.
You can't specify a subnet in a constrained Availability Zone. However, you can specify a subnet in a non-constrained Availability Zone and use cross-zone load balancing to distribute traffic to targets in the constrained Availability Zone.
You can't specify a subnet in a Local Zone.
You can't remove a subnet if its Availability Zone has active Amazon VPC endpoint associations.
When adding back a previously removed subnet, a new network interface is created with a different ID.
Subnet changes within the same Availability Zone must be independent actions. You first complete removing the existing subnet, then you can add the new subnet.
Subnet removal can take up to 3 minutes to complete.
6.Example Use Case
Let’s say your application is currently load-balanced across three AZs: us-east-1a, us-east-1b, and us-east-1c. You notice that us-east-1c is underutilized and you want to reduce costs. You can now:
Remove us-east-1c from the NLB.
Retain the load balancer and continue traffic flow across us-east-1a and us-east-1b.
Scale back to three AZs later if needed by adding us-east-1c again.
7.Getting Started
To use this feature:
Open the EC2 Dashboard > Load Balancers.
Select your Network Load Balancer.
Under the Subnets section, click Edit Subnets.
Deselect the subnet/AZ you wish to remove.
Save your changes.
CLI Example: bash
aws elbv2 set-subnets --load-balancer-arn <NLB-ARN> --subnets subnet-12345678 subnet-23456789
(This command updates the subnet configuration to exclude the AZ you want to remove.)
8.Conclusion
The new support for removing Availability Zones from AWS Network Load Balancers offers enhanced control, cost efficiency, and operational agility for businesses running workloads on AWS. This update allows users to adapt their infrastructure in real-time, aligning resource usage with evolving application needs—all without disrupting service availability or undergoing complex migrations.
Whether you’re optimizing for cost, managing maintenance, or adjusting to workload demands, this feature empowers you to do more with less complexity.