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 define the scaling configuration for the pool as well as the configuration for Droplets in the pool.
From the DigitalOcean Control Panel, in the left menu, click Droplets, which has both a Droplets tab and an Autoscale Pools tab.
Click the Create an Autoscale Pool button to go to the autoscale pool creation page
In the Autoscale Pool Configuration section, you choose the configuration of the pool:
Autoscale dynamically manages the number of Droplets in the pool based on their aggregate resource utilization. You choose:
Pool Size, which controls the minimum and maximum number of Droplets in the pool.
Target Utilization, which control which metrics (CPU, memory, or both) to monitor and at what thresholds to scale.
Autoscale 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. With multiple metrics set, the pool uses the largest result of this calculation across all metrics.
For example, an autoscale pool with 2 Droplets, a target utilization of 80% CPU, and a current utilization of 95% CPU would scale to 3 Droplets: ceil(2 Droplets * (80% target CPU / 95% current CPU)) = ceil(2.375) = 3
.
Cooldown Duration, which 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 and prevents downtime during configuration changes by giving new Droplets time to boot before destroying the old ones.
Choose a cooldown duration at least as long as it takes your Droplets to boot.
Fixed Size maintains a fixed number of Droplets in the pool. Autoscale pools set to fixed size have a cooldown duration of 10 minutes which you cannot change. You choose:
In the Autoscale Pool Droplets Configuration section, choose the configuration for Droplets within the autoscale pool:
Datacenter region
VPC network
Image, which can be a base OS image, a snapshot or backup, or a custom image.
Droplet plan
SSH keys, which are mandatory
IPv6
Startup scripts, which is user data
Make sure that Droplets in the pool automatically run your application on boot to make the application available on Droplets that the autoscale pool provisions. For example, you can configure unit files in a custom image or specify user data.
In the Finalize section, you choose following options:
A unique autoscale pool name
A project for the autoscale pool
Optionally, tags for the Droplets in the pool
We strongly recommend tagging the Droplets in your autoscale pool. This lets you use DigitalOcean Load Balancers to forward traffic to the entire pool and apply cloud firewall rules to the pool automatically.
When you finish selecting your configuration, click Create Autoscale Pool.
You can access and perform actions on Droplets in an autoscale pool like regular Droplets, but we strongly recommend not modifying or adding resources to Droplets in an autoscale pool. These changes do not propagate to new or other existing Droplets in the pool and are lost if the autoscaling pool deletes the Droplet. Instead, change the Droplet configuration for the autoscaling pool.
To view or edit an autoscale pool from the DigitalOcean Control Panel, in the left menu, click Droplets, then click the Autoscale Pools tab to go to the autoscale pools page. This page lists your team’s autoscale pools with an overview of their status. Click on an autoscale pool to go to its detail page:
Each autoscale pool page has the following tabs:
The Resources tab displays information about the pool, like the individual Droplets, the average resource utilization, and the pool size.
The Insights tab displays graphs for the number of Droplets in the pool and average resource utilization.
The Activity tab displays a history of events in the pool, like configuration changes and provisioning.
The Settings tab displays both the autoscale pool configuration and the Droplet configuration.
The Settings tab is where you can modify or destroy the pool.
To edit the pool, click Edit next to the setting you want to change. You can change the Droplet configuration for the pool, switch between autoscale and fixed size, and modify the pool configuration.
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.
The Settings tab is also where you can destroy the pool. In the Destroy Autoscale Pool section, click Destroy. In the window that opens, optionally check Destroy Droplets in the pool to destroy the Droplets in the pool, or leave it unchecked to keep the Droplets after the pool is destroyed. Enter the name of the autoscale pool in the confirmation box, then click Delete. This permanently and irreversibly destroys the autoscale pools and all Droplets in the pool.