A company runs a specialized API service on Amazon EC2 instances. The API service listens on port 8080. A SysOps Administrator configures an Application Load Balancer (ALB) with a target group that routes traffic to these instances on port 8080. The target group health check is configured with the protocol HTTP, the path `/health`, and the port explicitly set to 80. The security group associated with the EC2 instances allows inbound traffic from the ALB on port 8080. However, all EC2 instances in the target group are reported as unhealthy with the status reason `HealthCheck.Failed`. Which action should the administrator take to resolve this health check issue?
- Modify the target group health check configuration to use the traffic-port or port 8080.Answer
- BAdd a rule to the security group of the EC2 instances to allow inbound traffic on port 80 from the ALB.
- CUpdate the target group health check path to `/` and change the protocol to HTTPS.
- DConfigure an Amazon Route 53 failover routing policy to redirect health check traffic to a backup target group.
Answer
Modify the target group health check configuration to use the traffic-port or port 8080.
The correct action is to modify the target group health check configuration to use the traffic-port or port 8080. By default, target group health checks are sent to the port on which the targets are registered (the traffic-port). Because the health check port was explicitly overridden to port 80 where no service is listening, the health checks failed. Reverting the health check port to the traffic-port (port 8080) aligns the health checks with the active application port.
Step-by-Step Solution
Key Concept
Elastic Load Balancing target groups perform health checks on registered targets. The health check port must align with the port where the backend service is actively listening, and the targets' security groups must permit inbound traffic on that health check port.