A solutions architect is configuring an Application Load Balancer (ALB) to distribute traffic to a fleet of Amazon EC2 instances managed by an Auto Scaling group (ASG). The transit tracking application running on the EC2 instances listens on TCP port 3000. The target group is configured to route traffic to port 3000. However, the health check port in the target group configuration is set to port 80. The ALB marks all EC2 instances as unhealthy, even though the application is responsive when accessed directly on port 3000 from within the VPC. Which action should the solutions architect take to resolve this issue and restore healthy status?
- AAdd an outbound rule to the security group of the EC2 instances to allow return traffic on port 80 to the ALB.
- BConfigure a Route 53 latency routing policy to bypass target group health checks and route client traffic directly to the instances.
- Modify the target group's health check configuration to query the traffic port or explicitly set it to port 3000.Cevap
- DAdd an outbound rule to the subnet Network ACL to allow traffic from the EC2 instances to the ALB on ephemeral ports, since security groups are stateless.
Cevap
Modify the target group's health check configuration to query the traffic port or explicitly set it to port 3000.
The correct answer is to modify the target group's health check configuration to query the traffic port or port 3000. When an Application Load Balancer target group is configured with a health check port that does not match the port where the application is listening (for example, port 80 instead of port 3000), the health check probes will fail, leading the load balancer to mark all targets as unhealthy even if the application itself is fully operational.
Adım Adım Çözüm
Anahtar Kavram
Target Group Health Checks and Port Configuration