Instance Scaling Groups dynamically adjust their number of Instances based on defined scaling policies. Scaling actions (scale up or down) are triggered when the monitored metric exceeds the configured thresholds from your policies. Instance Scaling Groups rely on the Cockpit product to gather the Instance metrics, such as RAM or bandwidth usage. The Load Balancer of your choice, which handles traffic for the given Instance group, is automatically configured according to the scaling action so that connections are properly distributed among the set of Instances.
The purpose of this product is to maintain optimal application performance and cost efficiency by scaling your Instance group up during peak traffic and scaling it down when demand decreases. This ensures that applications have the necessary resources to handle varying loads without manual intervention, providing high availability and fault tolerance. Instance Scaling Groups are particularly useful for dynamic workloads, enabling businesses to optimize resource usage and reduce operational overhead.
Note
This product is currently in Public BetaOpen in new context.
Quickstart
-
Configure your environment variables.
Note
This is an optional step that seeks to simplify your usage of the Instance Scaling Groups API.
Code -
Create an Instance Template: run the following command to create an Instance template. The created template will be used by the group during scaling to start new Instances, according to the given settings.
Code -
Create an Instance Group: run the following command to create an Instance group. You must have already configured a Load Balancer, so that the Instance group can update its backend servers list during scaling actions. You can specify the Private Network to be used for traffic between your Load Balancer and the Instances. If specified, the given Private Network must be already attached to the Load Balancer.
Code -
Create Scaling Policies: run the following command to create scaling policies. Scaling policies are a set of rules which define criteria for scaling actions. Create at least 2 policies for both scaling up and down actions.
Code -
Get a list of scaling events: run the following command to get a list of all the scaling events which occurred for the given Instance group:
Code -
Delete your Instance Group: run the following command to delete an Instance group. Ensure that you replace
<INSTANCE_GROUP_ID>in the URL with the ID of the Instance group you want to delete.Code
Requirement
- You have a Scaleway accountOpen in new context
- You have created an API keyOpen in new context and that the API key has sufficient IAM permissionsOpen in new context to perform the actions described on this page
- You have installed
curlOpen in new context
Technical information
Instance Scaling Groups rely on the CockpitOpen in new context product to gather metrics and take scaling actions based on defined policies. Scaling can thus occur every 5 minutes, which is the time to re-fetch metrics from Cockpit after a previous iteration.
Availability Zones
The Scaleway Instance Scaling Groups API is a zoned API, meaning that each call must specify in its path parameters the Availability Zone for the resources concerned by the call.
The following Availability Zones are available for Instance Scaling Groups:
| Name | API ID |
|---|---|
| Paris | fr-par-1 fr-par-2 |
Technical limitations
- When you update an Instance template, changes are not replicated to existing Instances. If you need to refresh all existing Instances so that they comply with the new template, you must terminate them so that the group can create new Instances based on the updated template.
- Custom metrics are not supported yet. You can only set scaling policies according to pre-defined "managed metrics".
- Instance Scaling Groups do not handle the creation of Load Balancers and their associated backends. Only backend server updates for the given existing backend are managed by the group.
- Instance Scaling Groups rely on the Instance status to determine whether it is healthy or not, not on the Load Balancer health check mechanism.
Going further
For more help using Scaleway Instance Scaling Groups, check out the following resources: