Why is my alias record pointing to an Application Load Balancer marked as "unhealthy" when I’m using “Evaluate Target Health”?

Lesedauer: 4 Minute
0

I'm using health checks in Amazon Route 53 for my alias record that points to an Application Load Balancer with multiple target groups. However, my alias record is marked as "unhealthy."

Short description

When you set Evaluate target health to Yes for an alias record, Route 53 evaluates the health of the resource that the alias target value specifies. For an Application Load Balancer, Route 53 considers the health checks that are associated with the target groups behind the load balancer.

When all the target groups in an Application Load Balancer are healthy, Route 53 marks the alias record as "healthy." To pass the target group health check, the number of healthy targets much reach the defined thresholds in your target group attributes. Route 53 then returns records according to your routing policy. For example, if you use latency-based routing, then Route 53 returns the least latent record from your DNS client or resolver's location.

If any target groups in an Application Load Balancer are unhealthy, then the alias record fails the Route 53 health check. Route 53 then returns one of the healthy records based on your routing policy. For example, if you use latency-based routing, then Route 53 returns the least latent healthy record from your DNS client or resolver's location.

Note: If all the target groups that are behind a load balancer are empty (no instances), then Route 53 also considers the record unhealthy.

Resolution

Use your preferred method to query your Application Load Balancer's domain name, such as dig or nslookup. Note the output from your query.

If Route 53 returns a record other than the Application Load Balancer's alias record, then check the target groups that are behind the load balancer. If the number or percentage of healthy instances doesn't meet the defined threshold in the following attributes, then Route 53 considers the record unhealthy:

  • target_group_health.dns_failover.minimum_healthy_targets.count
  • target_group_health.dns_failover.minimum_healthy_targets.percentage

For more information, see Health checks for your target groups.

If all target groups that are behind a load balancer are empty, with no instances in them, then Route 53 also considers the record unhealthy. To add instances to your target group, see Register targets with your target group.

Troubleshooting example

The following table shows an example Route 53 configuration for the domain example.com. The example client and resolver are located in the us-east-1 region. The example Application Load Balancer contains two target groups, TargetGroup1 and TargetGroup2, each with two instances. The example configuration uses latency-based routing. There's an alias record to an Application Load Balancer and a standard A record:

NameTypeValueEvaluate Target HealthAvailability Zone
example.comAALIAS ALB-XXXXXX.us-east-1.elb.amazonaws.comYesus-east-1
example.comA198.51.100.1-us-west-2

Route 53 returns the Application Load Balancer alias record in the following cases:

  • TargetGroup1 is healthy, and TargetGroup2 is healthy
  • TargetGroup1 is healthy, and TargetGroup2 is empty (no instances are added to the group)

Route 53 returns the other A record in the following cases:

  • Either TargetGroup1 or TargetGroup2 is unhealthy
  • TargetGroup1 is healthy, TargetGroup2 is unhealthy, and an additional target group, TargetGroup3, is empty (no instances)

Related information

Why can't I select my preferred alias target when creating a Route 53 alias resource record set?

How health checks work in simple Amazon Route 53 configurations

How health checks work in complex Amazon Route 53 configurations

AWS OFFICIAL
AWS OFFICIALAktualisiert vor 9 Monaten