Autoscaling Groups API
Instance Autoscaling Groups dynamically adjust their number of Instances based on defined scaling policies. Scaling actions (scaling-out or scaling-in) are triggered when the monitored metric exceeds the configured thresholds from your policies. Instance Autoscaling Groups rely on the Cockpit product to gather the Instance metrics, such as RAM or bandwidth usage. If a Scaleway Load Balancer is configured in the Instances Autoscaling Group, the Load Balancer will automatically be updated on scaling-out and scaling-in actions so that connections are properly distributed among the active set of Instances. You may also configure the Autoscaling Group to re-cycle Instances that appear as un-healthy by the Load Balancer.
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 Private 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 using the Instances API. The created template will be used by the group during scaling to start new Instances, according to the given settings.
Code -
Create an Autoscaling Group: run the following command to create an Instance Autoscaling group. You may have already configured a Load Balancer, so that the Instance group can update its backend servers list during scaling actions.
Code -
Get the Autoscaling Group logs: run the following command to get the logs for the given Instance Autoscaling Group:
Code -
Get a list of scaling alerts: run the following command to get a list of all the alerts which occurred for the given Instance Autoscaling Group:
Code -
Get a list of active instances: run the following command to get a list of all the instances managed by the given Instance Autoscaling Group:
Code -
Delete your Instance Autoscaling Group: run the following command to delete an Instance Autoscaling Group:
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.
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 fr-par-3 |
IAM Managed Application
Instance Autoscaling Group needs to take actions on behalf of the user, to create resources (Instances, Block volumes, Ipam addresses, Observability tokens), delete them, or update existing resources (Load Balancers, Private Networks). When an Instance Autoscaling Group is created, an IAM managed Application is created with the following permission sets:
- BlockStorageFullAccess
- InstancesFullAccess
- IPAMReadOnly
- LoadBalancersFullAccess
- ObservabilityFullAccess
- PrivateNetworksFullAccess
Cockpit token
Instance Autoscaling Group need to query the managed Instances metrics, to take scale-out or scale-in decisions. Managed tokens will be created in the Cockpit product with access level "Query metrics" to access the required metrics.
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 RAM or CPU usage.
- 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.
Going further
For more help using Scaleway Instance Scaling Groups, check out the following resources: