Application Load Balancers
A load balancer serves as the single point of contact for clients. Clients send requests to the load balancer, and the load balancer sends them to targets, such as EC2 instances. To configure your load balancer, you create target groups, and then register targets with your target groups. You also create listeners to check for connection requests from clients, and listener rules to route requests from clients to the targets in one or more target groups.
For more information, see How Elastic Load Balancing works in the Elastic Load Balancing User Guide.
Contents
Subnets for your load balancer
When you create an Application Load Balancer, you must enable the zones that contain your targets. To enable a zone, specify a subnet in the zone. Elastic Load Balancing creates a load balancer node in each zone that you specify.
Considerations
-
Your load balancer is most effective when you ensure that each enabled zone has at least one registered target.
-
If you register targets in a zone but do not enable the zone, these registered targets do not receive traffic from the load balancer.
-
If you enable multiple zones for your load balancer, the zones must be of the same type. For example, you can't enable both an Availability Zone and a Local Zone.
-
You can specify a subnet that was shared with you.
-
Elastic Load Balancing creates network interfaces in the subnets where you configured your load balancer. These network interfaces are reserved so that the load balancer can complete maintenance actions even when the subnet is running low on available IP addresses. They have the description "ENI reserved by ELB for subnet".
Application Load Balancers support the following types of subnets.
Availability Zone subnets
You must select at least two Availability Zone subnets. The following restrictions apply:
-
Each subnet must be from a different Availability Zone.
-
To ensure that your load balancer can scale properly, verify that each Availability Zone subnet for your load balancer has a CIDR block with at least a
/27bitmask (for example,10.0.0.0/27) and at least eight free IP addresses per subnet. These eight IP addresses are required to allow the load balancer to scale out if needed. Your load balancer uses these IP addresses to establish connections with the targets. Without them your Application Load Balancer could experience difficulties with node replacement attempts, causing it to enter a failed state.Note: If an Application Load Balancers subnet runs out of usable IP addresses while attempting to scale, the Application Load Balancer will run with insufficient capacity. During this time, old nodes continue to serve traffic, but the stalled scaling attempt might cause 5xx errors or timeouts when attempting to establish a connection.
Local Zone subnets
You can specify Local Zone subnets. The following features are not supported with local zone subnets:
-
Lambda functions as targets
-
Mutual TLS authentication
-
AWS WAF integration
Outpost subnets
You can specify a single Outpost subnet. The following restrictions apply:
-
You must have installed and configured an Outpost in your on-premises data center. You must have a reliable network connection between your Outpost and its AWS Region. For more information, see the AWS Outposts User Guide.
-
The load balancer requires two
largeinstances on the Outpost for the load balancer nodes. The supported instance types are shown in the following table. The load balancer scales as needed, resizing the nodes one size at a time (fromlargetoxlarge, thenxlargeto2xlarge, and then2xlargeto4xlarge). After scaling the nodes to the largest instance size, if you need additional capacity, the load balancer adds4xlargeinstances as load balancer nodes. If you do not have sufficient instance capacity or available IP addresses to scale the load balancer, the load balancer reports an event to the AWS Health Dashboard and the load balancer state isactive_impaired. -
You can register targets by instance ID or IP address. If you register targets in the AWS Region for the Outpost, they are not used.
-
The following features are not supported:
-
AWS Global Accelerator integration
-
Lambda functions as targets
-
Mutual TLS authentication
-
Sticky sessions
-
User authentication
-
AWS WAF integration
-
Target optimizer
-
Health check logs
-
Connection logs
-
Capacity unit reservation
-
JWT verification
-
Automated target weights
-
FIPS security policies
-
An Application Load Balancer can be deployed on c5/c5d, m5/m5d, r5/r5d, c7i, m7i, or r7i instances on an Outpost. The following table shows the size and EBS volume per instance type that the load balancer can use on an Outpost:
| Instance type and size | EBS volume (GB) |
|---|---|
| c5/c5d | |
| large | 25 |
| xlarge | 25 |
| 2xlarge | 25 |
| 4xlarge | 25 |
| m5/m5d | |
| large | 25 |
| xlarge | 25 |
| 2xlarge | 25 |
| 4xlarge | 25 |
| r5/r5d | |
| large | 25 |
| xlarge | 25 |
| 2xlarge | 25 |
| 4xlarge | 25 |
| c7i | |
| large | 25 |
| xlarge | 25 |
| 2xlarge | 25 |
| 4xlarge | 25 |
| m7i | |
| large | 25 |
| xlarge | 25 |
| 2xlarge | 25 |
| 4xlarge | 25 |
| r7i | |
| large | 25 |
| xlarge | 25 |
| 2xlarge | 25 |
| 4xlarge | 25 |
Load balancer security groups
A security group acts as a firewall that controls the traffic allowed to and from your load balancer. You can choose the ports and protocols to allow for both inbound and outbound traffic.
The rules for the security groups that are associated with your load balancer must allow traffic in both directions on both the listener and the health check ports. Whenever you add a listener to a load balancer or update the health check port for a target group, you must review your security group rules to ensure that they allow traffic on the new port in both directions. For more information, see Recommended rules.
Load balancer state
A load balancer can be in one of the following states:
provisioning-
The load balancer is being set up.