Ensure that your Amazon Application Load Balancers (ALBs) are configured to use the Least Outstanding Requests algorithm in order to efficiently balance requests across targets based on the target group with the lowest number of outstanding requests. This routing algorithm is particularly useful for application workloads with varied request sizes, targets that change frequently, and targets with varied levels of processing power, including those with a mix of instance types within a single auto-scaling group.
efficiency
A routing algorithm determines how the load balancer selects targets from the associated target group when routing requests. The algorithms used by the Application Load Balancers (ALBs) are Round-Robin and Least Outstanding Requests. In contrast to Round-Robin, with Least Outstanding Requests (LOR) algorithm, as the new request comes in, the Application Load Balancer will send it to the target with the least number of outstanding requests. Targets processing long-standing requests or having lower processing capabilities are not weighed down with more requests and the load is evenly spread across targets. With LOR routing algorithm you can easily avoid over-utilization or under-utilization of targets within target groups when the requests had varied processing times or targets were frequently added or removed.
Audit
To determine if your Application Load Balancers are configured to use the Least Outstanding Requests routing algorithm, perform the following operations:
Remediation / Resolution
To enable the Least Outstanding Requests (LOR) routing algorithm for your Application Load Balancers (ALBs), perform the following operations:
References
- AWS Documentation
- Elastic Load Balancing FAQs
- Application Load Balancers
- How Elastic Load Balancing works
- AWS Command Line Interface (CLI) Documentation
- describe-load-balancers
- describe-listeners
- describe-target-group-attributes
- modify-target-group-attributes