Understand AWS Route 53 Failover - Simple Configuration

2019年01月04日

The "simple configuration" in this article's title means the opposite of "complex configuration", as referred in document: Configuring DNS Failover.
*
Failover records

Failover records generally work the same way as other routing types. You create health checks and associate them with non-alias records, and you set Evaluate Target Health to Yes for alias records. Note the following:

  • Both the primary and secondary records can be a non-alias record or an alias record.
  • If you associate health checks with both the primary and secondary failover records, here's how Route 53 responds to requests:
    • If Route 53 considers the primary record healthy (if the health check endpoint is healthy), Route 53 returns only the primary record in response to a DNS query.
    • If Route 53 considers the primary record unhealthy and the secondary record healthy, Route 53 returns the secondary record instead.
    • If Route 53 considers both the primary and secondary records unhealthy, Route 53 returns the primary record.
  • When you're configuring the secondary record, adding a health check is optional. If you omit the health check for the secondary record, and if the health check endpoint for the primary record is unhealthy, Route 53 always responds to DNS queries by using the secondary record. This is true even if the secondary record is unhealthy. (这个效果实验没做出来)
*
Test Case 1
Verify the statement "If Route 53 considers the primary record unhealthy and the secondary record healthy, Route 53 returns the secondary record instead." Especially to get a deeper understanding of its meaning.
*

*
Now I will simulate the resource that is represented by the secondary failover record being failed as well.

Note
Both of the ALBs are now deployed in AWS region us-west-2.

*

*
Tips
Use ALB to configure fix 503 response, to distinguish the two ALBs. Otherwise, they just display "503 Service Temporarily Unavailable", making it hard to tell who is who.
*

Even though the Lambda returns a response 503, it is still deemed as healthy.

Note
There is no additional health check towards Lambda in the target group health check configuration.
*

Category: AWS Tags: public

Upvote


Downvote