- Newest
- Most votes
- Most comments
To address your questions about Route 53 latency-based routing and failover:
-
Latency-based routing alone does not automatically failover or divert traffic based on performance degradation. Route 53 uses historical latency data to make routing decisions, but it doesn't actively monitor real-time performance issues like slow lambda function responses. This means that clients connected to the region1 endpoint (apigw1) would not automatically be diverted to region2 (apigw2) if performance degrades in region1.
-
To ensure failover to a healthy region endpoint in case of issues, you should implement a combination of health checks and failover routing along with your latency-based routing. Here's how you can modify your setup:
a. Create health checks for each regional endpoint (apigw1 and apigw2).
b. Instead of using just latency-based routing, implement a combination of failover and latency routing:
- Create two failover records (primary and secondary) for api.mydomain.com.
- For each failover record, create latency-based alias records pointing to your regional API Gateway endpoints.
- Associate the health checks with the corresponding latency records.
c. Configure the failover records:
- Set one region as primary and the other as secondary.
- Route 53 will use the primary region when it's healthy, and automatically switch to the secondary if the primary fails the health check.
d. Within each failover record, the latency-based routing will direct traffic to the lowest latency endpoint within that group.
This setup allows you to maintain the benefits of latency-based routing while also implementing automatic failover in case of regional issues. Route 53 will detect when an endpoint is unhealthy based on the health checks and stop including it when responding to queries.
Remember to configure appropriate health check parameters that accurately reflect the performance and availability of your API Gateway and Lambda function. This ensures that Route 53 can detect issues and initiate failover when necessary.
By implementing this combination of failover and latency-based routing with health checks, you can achieve both low-latency routing under normal conditions and automatic failover to a healthy region when issues occur in one region.
Sources
Latency-based routing - Amazon Route 53
Active-active and active-passive failover - Amazon Route 53
Cross-Region DNS-based load balancing and failover - Real-Time Communication on AWS
Route 53 Latency-Based Routing (LBR) does not inherently perform failover when the performance of one region degrades. LBR is designed to route users to the endpoint that has the lowest latency based on historical measurements, not current performance metrics.
Latency-Based Routing alone does not failover based on performance degradation. Solution: Add health checks and use Failover Routing Policy alongside Latency-Based Routing. Consider monitoring and automation with CloudWatch and Lambda to proactively manage endpoint health.
Relevant content
- asked 3 months ago
- asked 3 years ago
- Accepted Answerasked a month ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 months ago
Thank you, Adeleke. This is very helpful.