A company has deployed a high-performance catalog search API on Amazon EC2 instances. The API application runs on the instances and is configured to listen for requests on port 8088. The instances are registered as targets in an Application Load Balancer (ALB) target group. The ALB health check status for all EC2 instances is reported as unhealthy, resulting in HTTP 502 (Bad Gateway) errors for clients. A configuration audit reveals that the target group's health check is configured to query port 80. Which action will resolve this issue and restore service availability?
- AChange the ALB listener port from 443 to 8088 to match the application port, allowing the health checks to bypass the target group configuration.
- Modify the target group configuration to use port 8088 or 'traffic-port' for the health check.Answer
- CLaunch the EC2 instances in a cluster placement group to automatically bridge the communication gap between port 80 and port 8088.
- DConfigure the target group to use a spread placement group to ensure that the health checks are distributed across different physical hardware hosts.
Answer
Modify the target group configuration to use port 8088 or 'traffic-port' for the health check.
The correct action is to modify the target group configuration to use port 8088 or 'traffic-port' for the health check. Since the API is configured to listen on port 8088, target group health checks sent to port 80 will fail because nothing is listening on that port on the EC2 instances. Aligning the health check port to port 8088 allows the load balancer to receive successful responses and mark the instances as healthy.
Step-by-Step Solution
Key Concept
ELB Target Group Health Check Configuration