Autoscale Pool Concepts

DigitalOcean Droplets are Linux-based virtual machines (VMs) that run on top of virtualized hardware. Each Droplet you create is a new server you can use, either standalone or as part of a larger, cloud-based infrastructure.


Droplet autoscale pools enable automatic horizontal scaling for a pool of Droplets based on resource utilization or a fixed size.

When you create an autoscale pool, you choose the scaling configuration for the pool (autoscale or fixed size). This article provides details on how autoscale pools determine the size of the pool, when to scale, and what happens during scaling events.

Determining Pool Size

Pools set to autoscale determine how many Droplets the pool should have by multiplying the utilization ratio by the current number of Droplets in the pool and taking the ceiling of the result.

For example, an autoscale pool with two Droplets, a target utilization of 80% CPU, and a current utilization of 95% CPU would perform the following calculation to determine the size of the pool:

  ceil(2 Droplets * (95% current CPU / 80% target CPU))
= ceil(2 Droplets * 1.1875)
= ceil(2.375 Droplets)
= 3 Droplets

Therefore, this pool would scale up from two Droplets to three Droplets.

With multiple metrics set, the pool uses the largest result of this calculation across all metrics.

Cooldown Duration

The cooldown duration of the pool is the minimum amount of time the autoscale pool waits between making modifications to the Droplets in the pool.

This cooldown prevents thrashing during scaling. It also prevents downtime during configuration changes by giving new Droplets time to boot before destroying the old ones.

You can specify the cooldown duration in autoscale pools set to autoscale. The cooldown duration for fixed size pools is set to 10 minutes, which you cannot change.

Graceful Shutdown

When autoscale pools scale down, they issue a shutdown event and wait 60 seconds before issuing a destroy event. You can use this time to perform cleanup operations, gracefully close connections, or other actions.

The way you handle shutdown events depends on your operating system and application. One example is to use a systemd unit file with Type=oneshot.

Droplet Configuration and Access

You can access and perform actions on Droplets in an autoscale pool like regular Droplets. This can be useful for debugging or one-off tasks.

However, Droplets in an autoscale pool are ephemeral. If you make modifications or add resources to Droplets in an autoscale pool, the changes do not propagate to new or other existing Droplets in the pool, and all changes are lost if the autoscale pool deletes the Droplet.

To make persistent changes, update the Droplet configuration for the autoscaling pool. When you change the Droplet configuration, the autoscale pool provisions Droplets with the new configuration, then waits for the cooldown duration before destroying the old Droplets. During this time, the pool temporarily has twice as many Droplets and may exceed the maximum size of the pool.

In this article...