AWS launches EC2 Auto Scaling Warm Pools
Warm Pools launch a configured number of instances in the background, allowing any lengthy application initialization or bootstrapping to take place, then shutting down those instances until needed. Additionally, users can choose to configure a hot pool to not be shut down to further reduce the latency caused by moving from a stopped state to a running state.
Hot pools are customizable, allowing users to configure pool size, change instance state, or enable lifecycle hooks.
Since 2009, AWS customers have used EC2 Auto Scaling to build and scale applications on AWS. While EC2 offers a way to meet real-time application demand using autoscaling groups, it takes a long time to prime instances.
Instances pre-initialized in a Warm Pool can be launched to serve traffic in as little as 30 seconds. This may not be optimal for regular scale-up tasks that are up and running in seconds, but it drastically reduces boot time, especially for applications with high boot time (eg: databases, servers applications, etc.).
To avoid the latency issue, some users had to increase the minimum size in an autoscaling group to ensure that they have instances that are readily available once an increase in application demand occurs. The oversupply led to other issues, including increased costs, compute waste, and skewed metrics.
There is a little limits to keep in mind when using Warm Pools for EC2.
A hot pool cannot be added to an autoscaling group that has a mixed instances policy or that uses ad hoc instances. Support for CloudFormation or CodeDeploy is not available at the time of writing and may arrive soon.
An EC2 instance can be put into a stopped state only if it is using an Amazon Elastic Block Store (EBS) which is attached to it as the only root device. Instances using a instance store because its root device cannot be stopped.
If the hot pool uses all the available instances in the event of a scale-out event, the instances launch directly into the autoscaling group (that is, cold starts). It can also happen if an Availability Zone is out of capacity.
Warm Pools made it possible to speed up application scaling using autoscaling groups by pre-initializing instances, making them readily available for commissioning.
Associated with lifecycle hooks, Warm Pools allow developers and operators to manage the operation of applications when instances enter and leave a hot pool. Users can get started with Warm Pools using the most recent AWS Command Line Interface (CLI) or all of it AWS SDK.