Overview

Instance Pools is an Exoscale service allowing users to provision groups of identical Compute instances automatically. You can define a number of instances in the pool and the service will keep the required number up and running for you in order to achieve:

  • High availability: using an Instance Pool ensures that the target quantity of Compute instances is running.
  • Elasticity: Instance Pools can be scaled up and down dynamically, allowing the number of instances to match actual load and be more cost-efficient.

Getting Started

Before getting started with Instance Pools, please be aware of the following aspects and restrictions:

  • Instance Pools and their managed Compute instances can’t span multiple Exoscale zones and can’t be migrated to another zone once created.
  • Instances Pool members might have different types. Updating the instance type applies only to new members, existing remain untouched.
  • If an Instance Pool is referenced by a Network Load Balancer Service, it cannot be deleted.

You can create an Instance Pool either from the Compute > Instance Pools section in the Exoscale portal or using the CLI command. 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

Instance Pool size is constrained by your organization’s resource limits. If you want to scale an Instance Pool up, make sure your account’s Compute instance limit allows you to do so prior to attempt scaling up and reach out to our support if necessary.

Note

If an Instance Pool needs to be deployed to a dedicated hypervisor – it can be achieved by specifying the --deploy-target flag.

Managing Instance Pools

In addition to normal CRUD operations, the following actions are available:

  • scale: to scale an Instance Pool to a desired number of Instances
  • evict: to evict specific members of an Instance Pool (will result in shrinking its size).

Retrieve an Instance Pool information

To retrieve its properties, you can access the expanded view of an existing Instance Pool by clicking on its name in the list accessible from the Compute > Instance Pools section in the Exoscale portal, or using the exo compute instance-pool show CLI command:

$ 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 do so, you can access the expanded view of an existing Instance Pool by clicking on its name in the list accessible from the Compute > Instance Pools section in the Exoscale portal then click on the Edit pool button, or using the exo compute instance-pool update CLI command. Here is an example of Instance Pool update using the CLI:

$ 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 (e.g. template, type, storage volume size etc.), the new value will be taken into account only for newly created members. Current instances won’t be affected by the change, meaning they will need to be destroyed manually so that the Instance Pool manager could replace it with “up-to-date” versions.

Note

In the event of an Instance Pool down-scaling, the excess of managed Compute instances are deleted starting with the oldest ones. This feature can be leveraged to quickly recycle the Instance Pool members by temporarily scaling up the size of the pool to double its size, and once the new Compute instances are operational – scale down the pool to its original size to automatically get rid of the stale Compute instances.

Delete an Instance Pool

To delete an an Instance Pool, click on the Destroy Pool icon located on the same line as its name in the list accessible from the Compute > Instance Pools section in the Exoscale portal, or use the exo compute instance-pool delete CLI command.

Warning

Deleting an Instance Pool also deletes its managed Compute instances.

Labels

Instance Pool supports labels that will also be propagated to the underlying virtual machines.

Instance Pools lifecycle

Instance Pools lifecycle can be described by the following states:

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 scaling request, creating Compute instances to meet the requested pool size
running The Instance Pool is in a stable state, all of its managed Compute instances are running
scaling down The Instance Pool is being scaled down following a user scaling request, deleting Compute instances to meet the requested pool size
destroying The Instance Pool is being destroyed

Instance Pool prefixes

By default, Instance Pools managed Compute instances are named the following way: pool-<first letters of the ID of the managing Instance Pool>-<random unique instance ID>.

This 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 virtual machine names.

Going Further

  • If you intend to deploy a cluster using Instance Pools, you can leverage the Exoscale Private Networks functionality to benefit from high performance and low latency connectivity between your Instance Pool members.
  • Provision Instance Pools using the Exoscale Terraform provider.

Pricing

This service is offered free of charge, only the resources consumed as a by-product of running Instance Pools (e.g. Compute instances, storage, egress network traffic) are charged at the usual rates.

Resources