Instance Pools
Exoscale Instance Pools are a service to provision groups of identical Compute instances automatically. You can define several instances in the pool, and the service will keep the required number up and running for you to achieve:
- High availability: using an Instance Pool ensures that the target quantity of instances is running.
- Elasticity: Instance Pools can be scaled up and down dynamically so the number of instances matches the actual load for better cost efficiency.
Getting Started
Before creating an Instance Pool, please note the following aspects and restrictions:
- Instance Pools and their managed Compute Instances cannot span multiple Exoscale zones. They cannot be migrated to another zone after being created.
- Instance Pool member instances might have different types. Updating the instance type applies only to new members; existing members remain untouched.
- If an Instance Pool is referenced by a Network Load Balancer service, it cannot be deleted.
You can create an Instance Pool from the Instance Pools section in the Portal under COMPUTE in the main navigation. You can also use the CLI.
Here is an example of Instance Pool creation using the CLI:
$ exo compute instance-pool create web \
--zone ch-gva-2 \
--size 3 \
--description "Web servers" \
--instance-type medium \
--template "Linux Ubuntu 20.04 LTS 64-bit" \
--security-group web \
--ssh-key admin \
--ipv6
✔ Creating Instance Pool "web"... 33s
┼──────────────────────┼──────────────────────────────────────┼
│ ID │ ab8fbe95-72d4-0703-fcae-6401540d86ff │
│ Name │ web │
│ Description │ Web servers │
│ Instance Type │ standard.medium │
│ Template │ Linux Ubuntu 20.04 LTS 64-bit │
│ Zone │ ch-gva-2 │
│ Anti-Affinity Groups | n/a │
│ Security Groups │ web │
│ Private Networks │ n/a │
│ Elastic IPs │ n/a │
│ IPv6 │ true │
│ SSH Key │ admin │
│ Size │ 3 │
│ Disk Size │ 50 GiB │
│ Instance Prefix │ pool │
│ State │ running │
│ Labels │ n/a │
│ Instances │ pool-ab8fb-xbedt │
│ │ pool-ab8fb-obain │
│ │ pool-ab8fb-cjrfw │
┼──────────────────────┼──────────────────────────────────────┼
NOTE
Your organization’s resource quotas constrain Instance Pool size.
If you want to scale an Instance Pool up, ensure your account’s instance quota allows you to do so before attempting scaling up. You can request a quota increase if necessary.
NOTE
If an Instance Pool needs to be deployed to a dedicated hypervisor, specify the--deploy-target
flag.
Managing Instance Pools
In addition to normal CRUD operations, the following actions are available:
scale
: scales an Instance Pool to a desired number of instancesevict
: evicts specific members of an Instance Pool, shrinking its size.
Retrieve Instance Pool Information
You can access an expanded view of an instance pool to retrieve its properties. Click on the instance pool name in the instance pools list view on the Portal under COMPUTE, or use the command:exo compute instance-pool show
in the CLI:
$ exo compute instance-pool show --zone ch-gva-2 web
┼──────────────────────┼──────────────────────────────────────┼
│ INSTANCE POOL │ │
┼──────────────────────┼──────────────────────────────────────┼
│ ID │ ab8fbe95-72d4-0703-fcae-6401540d86ff │
│ Name │ web │
│ Description │ Web servers │
│ Instance Type │ standard.medium │
│ Template │ Linux Ubuntu 20.04 LTS 64-bit │
│ Zone │ ch-gva-2 │
│ Anti-Affinity Groups | n/a │
│ Security Groups │ web │
│ Private Networks │ n/a │
│ Elastic IPs │ n/a │
│ IPv6 │ true │
│ SSH Key │ admin │
│ Size │ 3 │
│ Disk Size │ 50 GiB │
│ Instance Prefix │ pool │
│ State │ running │
│ Labels │ n/a │
│ Instances │ pool-ab8fb-xbedt │
│ │ pool-ab8fb-obain │
│ │ pool-ab8fb-cjrfw │
┼──────────────────────┼──────────────────────────────────────┼
Update an Instance Pool’s Properties
The following properties can be updated in place for an Instance Pool:
- Name
- Description
- Deploy Target
- IPv6 support
- User Data
- Labels
- Managed Compute instances prefix
- Managed Compute instances template
- Managed Compute instances type
- Managed Compute instances Anti-Affinity Groups
- Managed Compute instances Elastic IPs
- Managed Compute instances Private Networks
- Managed Compute instances Security Groups
- Managed Compute instances prefix
- Managed Compute instances SSH key
- Managed Compute instances Storage volume size
To update an instance pool, click on the instance pool name on the instance pools list in the Portal, then click on the UPDATE POOL button is on the top right of the header.
In the CLI, use the exo compute instance-pool update
command:
$ exo compute instance-pool update web --zone ch-gva-2 --disk-size 20
✔ Updating Instance Pool "web"... 6s
┼──────────────────────┼──────────────────────────────────────┼
│ INSTANCE POOL │ │
┼──────────────────────┼──────────────────────────────────────┼
│ ID │ ab8fbe95-72d4-0703-fcae-6401540d86ff │
│ Name │ web │
│ Description │ Web servers │
│ Service Offering │ Medium │
│ Template │ Linux Ubuntu 20.04 LTS 64-bit │
│ Zone │ ch-gva-2 │
│ Anti-Affinity Groups | group1 │
│ Security Groups │ web │
│ Private Networks │ n/a │
│ Elastic IPs │ n/a │
│ IPv6 │ true │
│ SSH Key │ admin │
│ Size │ 3 │
│ Disk Size │ 20 GiB │
│ Instance Prefix │ pool │
│ State │ running │
│ Labels │ n/a |
│ Instances │ pool-ab8fb-xbedt │
│ │ pool-ab8fb-obain │
│ │ pool-ab8fb-cjrfw │
┼──────────────────────┼──────────────────────────────────────┼
NOTE
When updating Instance Pool properties related to its managed Compute instances (such as template, type, or storage volume size), the new value will be considered only for newly created instances. Current Compute Instances in the pool will not be affected by the change. These instances will need to be destroyed manually so that the Instance Pool manager can replace them with up-to-date versions.
NOTE
If an Instance Pool scales down, the excess managed Compute Instances are deleted, starting with the oldest instances. This feature can be used to quickly recycle the Instance Pool members by temporarily scaling up the pool to double its size. After the new Compute instances are operational, scale down the pool to its original size to automatically delete the stale Compute instances.
Delete an Instance Pool
To delete an Instance Pool, click on the instance pool name on the instance pools list in the Portal, then click on the DELETE POOL button in the top right of the header.
You can use the exo compute instance-pool delete
command in the
CLI.
WARNING - Deleting an Instance Pool also deletes its managed Compute instances.
Labels
Instance Pool supports labels that will also be propagated to the member instances.
The Instance Pool Lifecycle
The following states can describe an Instance Pool’s lifecycle:
State | Description |
---|---|
CREATING | The Instance Pool is being provisioned for the first time. |
SCALING UP | The Instance Pool is being scaled up following its creation or a user’s scaling request, creating Compute instances to meet the requested pool size. |
RUNNING | The Instance Pool is stable, and all of its managed Compute instances are running. |
SCALING DOWN | The Instance Pool is being scaled down following a user’s scaling request, deleting Compute instances to meet the requested pool size. |
DESTROYING | The Instance Pool is being destroyed. |
Instance Pool Prefixes
By default, Instance Pool-managed Compute instances are named as:
pool-<first letters of the ID of the managing Instance Pool>-<random unique instance ID>
.
This naming pattern can be customized by passing the --instance-prefix
parameter during an Instance Pool creation or update. For example, if you pass the string applications
to --instance-prefix
, pool
will be replaced by applications
in the instance names.
Going Further
- If you intend to deploy a cluster using Instance Pools, you can leverage the Exoscale Private Networks functionality for high-performance and low latency connectivity between your Instance Pool member instances.
- Provision Instance Pools using the Exoscale Terraform Provider.
Pricing
This service is offered free of charge; only the resources consumed as a byproduct of running Instance Pools (such as Compute instances, storage, and egress network traffic) are charged at our regular rates.
Resources
- Create an Instance Pool in the Portal.
- Instance Pools API documentation.
Private Instances
At Exoscale each compute instance is provided with a public IP by default. At creation, public IP assignment can be controlled and offers three modes:
ipv4
: The instance is assigned a Public IPv4 addressdual
: The instance is assigned a Public IPv4 and a Public IPv6 addressnone
: No public IP attachment is done on the instance, it is a private instance
Instances initially assigned with an IPv4 address can be promoted to dual-stack (IPv4 and IPv6), but private instances remain without public IP assignments for their entire lifetime. Similarly, public instances cannot be converted to private, ensuring their public IP assignment persists throughout their lifecycle.
You can create a private instance from the Portal, or You can also use the CLI.
Here is an example of Private Instance creation using the CLI:
$ exo compute instance create my-private-instance --private-instance
✔ Creating instance "my-private-instance"... 13s
┼──────────────────────┼──────────────────────────────────────┼
│ COMPUTE INSTANCE │ │
┼──────────────────────┼──────────────────────────────────────┼
│ ID │ 5921300e-6bae-491b-8b15-1e927aef403a │
│ Name │ my-private-instance │
│ Creation Date │ 2023-10-02 20:12:37 +0000 UTC │
│ Instance Type │ standard.medium │
│ Template │ Linux Ubuntu 22.04 LTS 64-bit │
│ Zone │ de-fra-1 │
│ Anti-Affinity Groups │ n/a │
│ Deploy Target │ - │
│ Security Groups │ n/a │
│ Private Instance │ Yes │
│ Private Networks │ n/a │
│ Elastic IPs │ n/a │
│ IP Address │ - │
│ IPv6 Address │ - │
│ SSH Key │ - │
│ Disk Size │ 50 GiB │
│ State │ running │
│ Labels │ n/a │
│ Reverse DNS │ │
┼──────────────────────┼──────────────────────────────────────┼
This newly created instance will not have any network. Most likely your use case involves some communication with other instances and services, and you should consider attaching a private instance to a private network.
Private Instance Metadata
Instance metadata is typically served over the http://169.254.169.254 address, private instances will instead see an additional read-only drive containing their metadata, compatible with the
cloud-init NoCloud
configuration source.
Caveats
The following caveats apply:
- Windows templates are not able to read metadata from the additional drive, standard Exoscale templates will require setting the password manually from the web portal console after the first boot.
- Metadata drives remain mounted and may contain credential information (for instance after a password reset request), metadata should thus be acted upon quickly