Question

Difficulty: MediumAuto Scaling and Elastic Load Balancing (ELB)

A company is hosting a specialized IoT data receiver application on Amazon EC2 instances within an Auto Scaling group (ASG) behind an Application Load Balancer (ALB). The application receives data streams on port 5001, but the application's internal diagnostics and health status endpoint runs on port 8081. After launching the instances, the ALB target group reports all EC2 instances as unhealthy, and no traffic is forwarded to them, even though local logs show the application is running normally. Which of the following configuration changes will resolve this issue?

  1. Modify the Application Load Balancer target group's health check configuration to override the port and specify port 8081.Answer
  2. B
    Update the Application Load Balancer listener rule to forward incoming traffic to port 8081, and set the target group's health check port to 'traffic-port'.
  3. C
    Add an inbound rule to the security group associated with the EC2 instances to allow port 8081, and configure the subnet's Network ACL with an inbound rule for port 8081 without adding a corresponding outbound rule.
  4. D
    Configure Amazon Route 53 latency routing to distribute traffic directly to the Auto Scaling group instances' public IP addresses, relying on Route 53 to failover during unhealthy states.

Answer

Modify the Application Load Balancer target group's health check configuration to override the port and specify port 8081.
The correct solution is to modify the Application Load Balancer target group's health check configuration to override the port and specify port 8081. By default, target groups perform health checks on the port where they receive traffic (the 'traffic-port', which is port 5001). Since the application's health endpoint is hosted on port 8081, the health check requests sent to port 5001 fail, marking the instances as unhealthy. Overriding the health check port to 8081 allows the Application Load Balancer to query the correct endpoint while client traffic is successfully routed to port 5001.

Step-by-Step Solution

1
Analyze the port configuration of the application and the health check endpoint.
The application listens for data on port 5001, but diagnostics run on port 8081.
To understand why health checks are failing under the default settings.
2
Determine the default behavior of the Elastic Load Balancing target group health check.
By default, the health check queries the 'traffic-port', which is port 5001.
Since the diagnostics endpoint is not on port 5001, the health check fails, marking the targets as unhealthy.
3
Identify the correct configuration change to target the health endpoint.
Override the target group's health check port setting to explicitly use port 8081.
This allows the load balancer to query the correct port for health checks while keeping the listener forwarding data traffic to port 5001.

Key Concept

Configuring custom health check ports in Elastic Load Balancing target groups to align with application-specific health endpoints.
Estimated Time:2m 0s
Rate this question