我有两个目标群体:
ATargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
Properties:
VpcId:
Fn::ImportValue: !Join [ "", [ !FindInMap [ EnvironmentMap, !Ref Environment, VpcStackName ], "-VPCID" ] ]
Port: 9001
Protocol: TCP
TargetType: ip
TargetGroupAttributes:
- Key: deregistration_delay.timeout_seconds
Value: '30'
- Key: preserve_client_ip.enabled
Value: true
BTargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
Properties:
VpcId:
Fn::ImportValue: !Join [ "", [ !FindInMap [ EnvironmentMap, !Ref Environment, VpcStackName ], "-VPCID" ] ]
Port: 9002
Protocol: TCP
TargetType: ip
TargetGroupAttributes:
- Key: deregistration_delay.timeout_seconds
Value: '30'
- Key: preserve_client_ip.enabled
Value: true
两者都将流量转发到相同的容器。
在端口 9001
我服务器 HTTP 流量。而 9002
服务器原始 TCP 流量。
如果我的 cloudformation 模板中的任何目标组均未指定 Health*
属性 ( https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html ),AWS 如何对注册目标执行运行状况检查?
最佳答案
根据您共享的链接,如果未指定运行状况检查路径,AWS 将使用默认运行状况检查路径进行检查。 为了确定这一点,并根据之前的经验判断,AWS 将检查其默认运行状况检查路径,因此如果您的应用程序具有不同的路径,您最好指定它们。
关于amazon-web-services - 如果没有为 HTTP 和 TCP 指定 Health* 属性,AWS 如何运行主动运行状况检查?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72689651/