A company runs a REST API on a fleet of Amazon EC2 instances located in a private subnet. These instances are registered to a target group for an Application Load Balancer (ALB) situated in the public subnets of the same VPC. The target group is configured to send HTTP health checks on port with the path `/healthz`.
A SysOps administrator observes that the ALB is reporting all registered targets as unhealthy with the error code `Target.FailedHealthChecks`. Consequently, clients requesting the application receive HTTP (Bad Gateway) errors.
The administrator verifies the following configuration details:
- Connecting to the EC2 instances directly via AWS Systems Manager Session Manager and running `curl -I http://localhost:8080/healthz` returns HTTP OK.
- The Security Group for the EC2 instances allows inbound TCP traffic on port from the ALB security group, and allows all outbound traffic.
- The Security Group for the ALB allows inbound TCP traffic on ports and from `0.0.0.0/0`, and allows all outbound traffic.
- The stateless Network Access Control List (NACL) for the private subnet has the following rules:
- Inbound: Rule allows TCP traffic on port from the public subnets' CIDR block. Rule denies all other traffic.
- Outbound: Rule allows TCP traffic on port to the public subnets' CIDR block. Rule denies all other traffic.
Which of the following is the most likely cause of the failing health checks?
- The outbound Network Access Control List (NACL) for the private subnet blocks response traffic back to the ALB because it does not allow outbound TCP traffic to the public subnets on ephemeral ports (-).Answer
- BThe target group is configured to perform health checks on port by default, creating a port mismatch because the instances are only listening on port .
- CThe Route 53 active-passive failover routing policy is configured without an associated health check, which causes the load balancer health status to be ignored.
- DThe target group's health check is pointing to a path that redirected the ALB to a secure HTTPS URL, leading the target group to mark the instances as unhealthy due to an unsupported redirect.