Question

Difficulty: MediumElastic Load Balancing Health Checks and Troubleshooting

A SysOps Administrator is configuring an Application Load Balancer (ALB) to distribute traffic to a fleet of Amazon EC2 instances. The EC2 instances run a web application that listens on port 3000. The Administrator creates a target group, sets the port to 3000, and registers the EC2 instances. After deployment, the load balancer reports that all registered instances are unhealthy. A direct curl request from a test instance to one of the application servers on http://<private-ip>:3000/api/status returns an HTTP 200 status code, but a request to http://<private-ip>:3000/ returns an HTTP 404 status code.

Which action will resolve this health check issue?

  1. Update the target group health check settings to use /api/status as the health check path.Answer
  2. B
    Change the target group health check port configuration from 'traffic-port' to port 80.
  3. C
    Modify the subnet's network ACL to allow outbound ephemeral ports (1024-65535) to the load balancer.
  4. D
    Reconfigure Amazon Route 53 to use a Failover routing policy pointing to an Amazon S3 static website.

Answer

Update the target group health check settings to use /api/status as the health check path.
Updating the target group health check path to a valid path that returns a 200 OK status code, such as /api/status, allows the load balancer to receive a successful response and mark the instances as healthy. By default, target groups perform health checks on the root path (/), which in this case returns an HTTP 404 response, causing the target group to classify the instances as unhealthy.

Step-by-Step Solution

1
Analyze the symptoms and test results provided in the scenario.
The target group health checks are failing (reporting instances as unhealthy). Direct access to port 3000 at the / path returns an HTTP 404 status code, whereas accessing the /api/status endpoint returns an HTTP 200 status code.
By default, Application Load Balancer target groups perform health checks on the root path (/) using the traffic port. An HTTP 404 response is treated as unhealthy by default.
2
Determine the necessary change to make the health check pass.
Update the health check path configuration in the target group to point to the valid /api/status endpoint.
This configuration change ensures that the ALB queries an endpoint that returns a successful HTTP 200 status code, indicating the backend application is functioning correctly.

Key Concept

Target group health check path configuration and response codes
Rate this question