The surge queue contains the requests or connections to a Classic load balancer that are pending routing to a healthy instance. There is a hard limit of 1024 pending requests, and any additional requests will get rejected.  Blue Matador monitors the surge queue length of all Classic load balancers and detects both when the length is unusually high or near the limit.


Effects


It is normal for a high-traffic load balancer to have a non-zero surge queue length. An increase in this metric, however can mean delayed response times for your users.  Once the limit of 1024 queued requests is reached, requests will be rejected by the load balancer.

 

Troubleshooting


Use application access logs or ELB access logs to investigate traffic being sent to your application. A high-traffic endpoint which has an increased response time can easily back up a web server. Additionally, any high latency endpoint that is seeing an increase in traffic could cause the entire web server to back up.

In the short-term, you can add capacity to the load balancer to alleviate a high surge queue. This is an appropriate action to take in response to a higher request rate. If a load balancer’s instances are managed by an AutoScaling Group, make sure that the ASG is correctly scaling up and down in response to traffic.

The long-term solution is to find the bottleneck in your application code and fix it. This can mean adjusting thread pool sizes, caching expensive operations, or simply scaling up.


RESOURCES