Available warm-up and cooldown settings - Amazon EC2 Auto Scaling

Available warm-up and cooldown settings

To help optimize scaling performance, choose the appropriate warm-up and cooldown settings for your Auto Scaling group.

We recommend using the DefaultInstanceWarmup setting, which unifies all the warm-up and cooldown settings. If needed, you can also use the HealthCheckGracePeriod setting.

The other available settings are not intended to be used at the same time as the DefaultInstanceWarmup setting. For example, EstimatedInstanceWarmup and InstanceWarmup aren't needed when DefaultInstanceWarmup is already defined, and DefaultCooldown and Cooldown are only needed when you use simple scaling policies. (As a best practice, we recommend target tracking and step scaling policies instead of simple scaling policies.) However, we will continue to support all of these settings so that you can choose the appropriate settings for your use case.

DefaultInstanceWarmup (Recommended)

API operation: CreateAutoScalingGroup, UpdateAutoScalingGroup

The amount of time, in seconds, until a new instance is considered to have finished initializing and resource consumption to become stable after it enters the InService state.

During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an instance before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the warm-up period before aggregating the metrics for new instances with existing instances in the Amazon CloudWatch metrics that are used for scaling, resulting in more reliable usage data. For more information, see Set the default instance warmup for an Auto Scaling group.

You can reduce the value of the warm-up period if you use a lifecycle hook to prepare new instances for use. For more information, see Amazon EC2 Auto Scaling lifecycle hooks.

Important

To manage various warm-up settings at the group level, we recommend that you set the default instance warmup, even if it is set to 0 seconds. To remove a value that you previously set, include the property but specify -1 for the value. However, we strongly recommend keeping the default instance warmup enabled by specifying a value of 0 or other nominal value.

Default: None

EstimatedInstanceWarmup

Not needed if DefaultInstanceWarmup is defined.

API operation: PutScalingPolicy

The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. This warm-up period applies to instances launched due to a specific target tracking or step scaling policy. When a warm-up period is specified here, it overrides the default instance warmup. For more information, see Target tracking scaling policies and Step and simple scaling policies.

Default: If not defined, the value of this parameter defaults to the value for the default instance warmup defined for the group. If default instance warmup is null, then it falls back to the value of default cooldown.

InstanceWarmup

Not needed if DefaultInstanceWarmup is defined.

API operation: StartInstanceRefresh

A time period, in seconds, during which an instance refresh waits before moving on to replacing the next instance after a new instance enters the InService state. Specifying a warm-up period when you start an instance refresh overrides the default instance warmup, but only for the current instance refresh. For more information, see Replace Auto Scaling instances based on an instance refresh.

Default: If not defined, the value of this parameter defaults to the value for the default instance warmup defined for the group. If default instance warmup is null, then it falls back to the value of the health check grace period.

DefaultCooldown

Only needed if you use simple scaling policies.

API operation: CreateAutoScalingGroup, UpdateAutoScalingGroup

The amount of time, in seconds, between one scaling activity ending and another one starting due to simple scaling policies. For more information, see Scaling cooldowns for Amazon EC2 Auto Scaling.

Default: 300 seconds

Cooldown

Only needed if you use simple scaling policies.

API operation: PutScalingPolicy

A cooldown period, in seconds, that applies to a specific simple scaling policy. (Simple scaling policies are no longer recommended. As a best practice, we recommend target tracking and step scaling policies instead.) When a cooldown period is specified here, it overrides the default cooldown. For more information, see Scaling cooldowns for Amazon EC2 Auto Scaling.

Default: None

HealthCheckGracePeriod

API operation: CreateAutoScalingGroup, UpdateAutoScalingGroup

The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that has come into service and marking it unhealthy due to a failed Elastic Load Balancing or custom health check. This is useful if your instances do not immediately pass these health checks after they enter the InService state. For more information, see Set the health check grace period for an Auto Scaling group.

You can set the value of the health check grace period to 0 if you use a lifecycle hook for instance launch. If your Auto Scaling group is behind a load balancer, consider adding a lifecycle hook to the group to make sure that your instances are ready to serve traffic before they are registered to the load balancer at the end of the lifecycle hook. For more information, see Amazon EC2 Auto Scaling lifecycle hooks.

Default: 300 seconds for an Auto Scaling group that you create in the AWS Management Console. 0 seconds for an Auto Scaling group that you create using the AWS CLI or an SDK.