Skip to content

Commit

Permalink
[Improvement] ecs/cluster - Avoid scaling deadlock (widdix#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaswittig authored May 6, 2019
1 parent f3a2bac commit 8bb5943
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions ecs/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,7 @@ Resources:
LaunchConfigurationName: !Ref LaunchConfiguration
MinSize: !Ref MinSize
MaxSize: !Ref MaxSize
Cooldown: '120'
HealthCheckGracePeriod: 300
HealthCheckType: ELB
TargetGroupARNs:
Expand Down Expand Up @@ -937,19 +938,23 @@ Resources:
ScaleUpPolicy:
Type: 'AWS::AutoScaling::ScalingPolicy'
Properties:
AutoScalingGroupName: !Ref AutoScalingGroup
PolicyType: StepScaling
AdjustmentType: PercentChangeInCapacity
MinAdjustmentMagnitude: 1
AutoScalingGroupName: !Ref AutoScalingGroup
Cooldown: '600'
ScalingAdjustment: 25
StepAdjustments:
- MetricIntervalUpperBound: 0.0
ScalingAdjustment: 25
ScaleDownPolicy:
Type: 'AWS::AutoScaling::ScalingPolicy'
Properties:
AutoScalingGroupName: !Ref AutoScalingGroup
PolicyType: StepScaling
AdjustmentType: PercentChangeInCapacity
MinAdjustmentMagnitude: 1
AutoScalingGroupName: !Ref AutoScalingGroup
Cooldown: '600'
ScalingAdjustment: -25
StepAdjustments:
- MetricIntervalLowerBound: 0.0
ScalingAdjustment: -25
ContainerInstancesShortageAlarm:
Type: 'AWS::CloudWatch::Alarm'
Properties:
Expand Down

0 comments on commit 8bb5943

Please sign in to comment.