amazon-web-services - 如果没有为 HTTP 和 TCP 指定 Health* 属性,AWS 如何运行主动运行状况检查?

标签 amazon-web-services aws-cloudformation amazon-elb nlb

我有两个目标群体:

  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/

相关文章:

mysql - AWS RDS 如何设置 MySQL 数据库

amazon-web-services - AWS在VPC中通过ELB连接EC2,如何配置?

amazon-web-services - 模板格式错误: YAML not well-formed

amazon-web-services - Opsworks 错误 : unable to find rds instance with ARN

amazon-web-services - 弹性Beanstalk更改ELB类型

amazon-web-services - AWS ELB 抛出 5XX 但注册的实例没有抛出 5XX 错误

linux - 限制某些IP的svn访问

amazon-web-services - 即使 Lambda 返回错误,AWS API Gateway 也会返回 200

java - 创建超过 30gb 的 EC2 实例 - 在 Java 中