A company runs a critical application on EC2 instances in an Auto Scaling group behind an Application Load Balancer (ALB) in a VPC. The application experiences unpredictable traffic spikes. The company notices that during peak traffic, the ALB returns 503 errors. The network engineer checks the ALB's CloudWatch metrics and sees that the 'ActiveConnectionCount' is high but 'TargetResponseTime' is low. The ALB's target group is configured with a deregistration delay of 300 seconds. The ALB is internet-facing and uses an SSL/TLS certificate from AWS Certificate Manager. The security group for the ALB allows inbound HTTPS from 0.0.0.0/0. The target instances' security group allows inbound traffic from the ALB's security group. The VPC has a CIDR of 10.0.0.0/16 with public and private subnets. The ALB is in public subnets, and the instances are in private subnets. The route tables for private subnets have a default route to a NAT gateway in the public subnets. The company wants to resolve the 503 errors. What should the network engineer do?
Higher idle timeout keeps connections alive, reducing connection rate.
Why this answer
The 503 errors are likely caused by the ALB reaching its connection limit (e.g., 50,000 concurrent connections). Increasing the idle timeout would keep connections open longer, increasing concurrent connections and worsening the issue. Decreasing the idle timeout would close idle connections faster, reducing concurrency.
Alternatively, scaling out the target group or adding more ALBs can distribute the load. None of the provided options are correct; the correct action is to reduce the idle timeout or increase the number of targets.