Soru

Zorluk: OrtaElastic Load Balancing Health Checks and Troubleshooting

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?

  1. Modify the target group health check configuration to use the traffic-port or port 8080.Cevap
  2. B
    Add a rule to the security group of the EC2 instances to allow inbound traffic on port 80 from the ALB.
  3. C
    Update the target group health check path to `/` and change the protocol to HTTPS.
  4. D
    Configure an Amazon Route 53 failover routing policy to redirect health check traffic to a backup target group.

Cevap

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.

Adım Adım Çözüm

1
Analyze the application listening port and security group settings.
The application listens on port 8080, and the security group allows inbound traffic from the ALB on port 8080.
This establishes that port 8080 is the correct path and port for network traffic to reach the application.
2
Identify the misconfiguration in the health check settings.
The health check port is explicitly configured as port 80, which is neither open in the security group nor has any service listening on it on the EC2 instances.
This explains why the health checks are failing with `HealthCheck.Failed`.
3
Select the resolution that aligns the health check port with the active application port.
Updating the health check port to use the traffic-port (port 8080) aligns the health check destination with the active port of the application.
This allows the ALB to successfully connect to the service on port 8080 and receive a valid health response.

Anahtar Kavram

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.
Bu soruyu puanla