英文:
Route53 Failover For Multiple Target Groups Behind ALB
问题
根据我的理解,Route53故障切换可以通过评估AWS资源的目标健康状态或通过Route53健康检查(即计算、终端点、CloudWatch)来触发。
目前,我们对主要的Route53别名记录进行了以下配置:
Route53 -> NLB -> ALB -> 目标组1 -> Lambda 1
-> 目标组2 -> Lambda 2
我们正在使用故障切换路由策略,其中次要的Route53指向另一个地区的NLB。我们正在使用“评估目标健康”来驱动故障切换。
此外,根据我的理解,根据AWS文档,如果任何目标组不健康,整个ALB将标记为不健康,并且指向它的主要Route53记录也将标记为不健康。
换句话说,使用这种网络配置,如果我在单个ALB后面有几个独立的Lambda服务,并且其中一个不健康,那么Route53会切换到另一个地区吗?
我需要的行为是,如果其中一个Lambda不健康,那么它的请求将被路由到另一个地区,而所有其他Lambda的请求将继续发送到主要地区。
英文:
As per my understanding, Route53 failover can be triggered via evaluating the target health of a AWS resource or via Route53 health checks (i.e. calculated, endpoint, cloudwatch).
Currently, we have the following configuration for the PRIMARY Route53 alias record:
Route53 -> NLB -> ALB -> Target Group 1 -> Lambda 1
-> Target Group 2 -> Lambda 2
We're using a failover routing policy, where the SECONDARY route53 points to another NLB in another region. We're using evaluate target health
to drive failover.
Also, per my understanding of AWS docs, if any target group is unhealthy, the entire ALB is marked as unhealthy and the primary Route53 record pointing to it is marked as unhealthy.
In other words, using this networking configuration, if I have several independent lambda services behind a single ALB and one of them becomes unhealthy, then Route53 will failover to another region?
The behavior I need is that if one of the lambdas becomes unhealthy, then its requests get routed to the other region, while all other lambda requests continue going to the primary region.
答案1
得分: 1
使用当前的架构,ALB的健康状态被视为指向的目标组的聚合。
要独立管理Lambda函数的故障转移,您需要更改架构。
我可以想到两个选项:
- 使用Route53分别评估每个ALB。
- 为每个Lambda函数配置CloudWatch警报。当函数变得不健康时,警报将触发Route53的健康检查,然后导致Route53重新路由流量到故障转移区域。
第二个选项提供了更精细的方法,但配置/管理开销更高。
英文:
With the current architecture, the health of ALB is treated as an aggregate of the target groups it points to.
To manage failover for Lambda functions independently, you will neet to change the architecture.
Two options I can think of:
- Separate ALBs with Route53 evaluating each one independently.
- Configure CloudWatch alarms for each of your Lambda functions. When a function becomes unhealthy, an alarm will trigger a Route53 health check, which will then cause Route53 to reroute traffic to the failover region.
The second option provides a more granular approach at the cost of higher configuration/management overhead.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论