Soru

Zorluk: OrtaAuto Scaling and Elastic Load Balancing (ELB)

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?

  1. A
    Add an outbound rule to the security group of the EC2 instances to allow return traffic on port 80 to the ALB.
  2. B
    Configure a Route 53 latency routing policy to bypass target group health checks and route client traffic directly to the instances.
  3. Modify the target group's health check configuration to query the traffic port or explicitly set it to port 3000.Cevap
  4. D
    Add 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

1
Identify the mismatch between the application listening port (port 3000) and the health check port (port 80) configured in the target group.
The ALB is attempting to perform health checks on port 80, which fails because the application is not listening on that port.
Understanding where the application is listening and how the health checks are configured is the first step in diagnosing ELB target health issues.
2
Update the target group health check settings to use the traffic port or port 3000.
The ALB successfully connects to the application on port 3000 during health checks.
Matching the health check port to the port where the service is active allows the ALB to accurately determine the health of the targets.

Anahtar Kavram

Target Group Health Checks and Port Configuration
Bu soruyu puanla