在CloudFormation中为AWS Load Balancer v2配置连接排放 [英] Configure Connection Draining for AWS Load Balancer v2 in CloudFormation
问题描述
此博客帖子(此处具体)详细信息如何使用 AWS :: ElasticLoadBalancing :: LoadBalancer
类型为经典版本1负载平衡器配置连接消耗,例如:
This blog post (here specifically) details how to configure connection draining for a 'classic' version 1 load balancer using the AWS::ElasticLoadBalancing::LoadBalancer
type, like so:
"ElasticLoadBalancer": {
"Type": "AWS::ElasticLoadBalancing::LoadBalancer",
"Properties": {
"ConnectionDrainingPolicy": {
"Enabled": "true",
"Timeout": "300"
},
...
}
}
如何使用类型为的版本2负载均衡器执行此操作AWS :: ElasticLoadBalancingV2 :: LoadBalancer
?
我对文档是我应该使用 LoadBalancerAttributes
,但找不到与连接有关的任何内容排空属性列表。
My best guess from the documentation is that I should use LoadBalancerAttributes
, but I can't find anything related to connection draining in the list of attributes here.
推荐答案
在Application Load Balancer(ELB V2)中,它使用 TargetGroups 和 TargetGroupAttributes
In Application Load Balancer(ELB V2 ) it in configured using TargetGroups and TargetGroupAttributes
deregistration_delay。 timeout_seconds-弹性
负载平衡在更改注销状态之前要等待的时间将
目标从消耗掉到未使用。范围是0-3600秒。
的默认值为300秒。
deregistration_delay.timeout_seconds - The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds.
TargetGroup:
Type: AWS::ElasticLoadBalancingV2::TargetGroup
Properties:
TargetGroupAttributes:
- Key: deregistration_delay.timeout_seconds
Value: '20'
这篇关于在CloudFormation中为AWS Load Balancer v2配置连接排放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!