我有一个网络负载均衡器和一个关联的目标组,配置为对EC2实例进行运行状况检查.问题是我看到了很多健康检查请求; 每秒多次.
检查之间的默认间隔应该是30秒,但是它们比它们应该的频率高出约100倍.
我的堆栈是在CloudFormation中构建的,我试过覆盖HealthCheckIntervalSeconds
,这没有任何效果.有趣的是,当我尝试在控制台中手动更改间隔时,我发现这些值是灰色的:
这是模板的相关部分,我尝试更改注释的间隔:
NLB:
Type: "AWS::ElasticLoadBalancingV2::LoadBalancer"
Properties:
Type: network
Name: api-load-balancer
Scheme: internal
Subnets:
- Fn::ImportValue: PrivateSubnetA
- Fn::ImportValue: PrivateSubnetB
- Fn::ImportValue: PrivateSubnetC
NLBListener:
Type : AWS::ElasticLoadBalancingV2::Listener
Properties:
DefaultActions:
- Type: forward
TargetGroupArn: !Ref NLBTargetGroup
LoadBalancerArn: !Ref NLB
Port: 80
Protocol: TCP
NLBTargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
Properties:
# HealthCheckIntervalSeconds: 30
HealthCheckPath: /healthcheck
HealthCheckProtocol: HTTP
# HealthyThresholdCount: 2
# UnhealthyThresholdCount: 5
# Matcher:
# HttpCode: 200-399
Name: api-nlb-http-target-group
Port: 80
Protocol: TCP
VpcId: !ImportValue PublicVPC
Run Code Online (Sandbox Code Playgroud)
我的EC2实例位于私有子网中,无法访问外部世界.NLB是内部的,因此没有通过API网关就无法访问它们.API网关没有 …
amazon-ec2 amazon-web-services amazon-elb aws-cloudformation