VM Auto Scaling Groups are a collection of virtual servers that automatically scale the number of VM replicas based on the metrics.
Note:
This process is limited to contract owners, administrators, and users with access rights to the data center hosting the VM Auto Scaling Group.
Configuration of a VM Auto Scaling Group triggers the creation of two monitoring alarms for scale in and scale out operations according to the policy settings.
Prerequisites:
When provisioning a VM Auto Scaling Group, ensure that the necessary resources are available and that they are within the configured resource limits of your contract. To check the contract resource limits in DCD, see Resource Overview.
IONOS recommends that you enable CloudInit or use existing images.
Follow these steps to configure a VM Auto Scaling , and define thresholds and scaling policies:
1. Log in to DCD with your username and password.
2. Go to Menu > Management > VM Auto Scaling.
3. Click Create to create a group and define replicas. The Create VM Auto Scaling Group window displays the Configuration and the Replica Configuration tabs.
4. Define the following in the Configuration tab:
5. Configure replicas. For more information, see Configure replicas.
Important: The application applies a default replica setup if you do not configure replicas. Hence, we recommend that you configure replicas before you click Create. It is also mandatory, as the ALB uses the IP addresses of the NICs linked to the VM instances. Provisioning the replica defaults does not configure a network, thus, the associated ALB is left without NICs or IP addresses.
6. Click Create to save the configuration.
Result: Your VM Auto Scaling Group is successfully configured. You can now manage it via the VM Auto Scaling Manager.
You can specify a name for your VM Auto Scaling Group and the minimum number and the maximum number of VM instances it can contain during scaling. The minimum number ensures that you never run out of VM instances and the group always has at least one VM instance. The feature cannot provide more than the maximum number of VM instances during a scale out operation.
To create a VM Auto Scaling Group, go to the Configuration tab in the Create VM Auto Scaling Group window and specify the following:
Name: Enter a name for the VM Auto Scaling Group.
Data Center: Select a data center from the drop-down list. You can either select an existing Virtual Data Center (VDC) or create a new one if required. The application lists all the VDCs in your DCD. The group is valid only within the selected VDC to which it belongs.
Minimum Count: Enter the minimum number of VMs the group must scale to. The minimum replica count is one. VM Auto Scaling uses this as a reference value to stop deleting VM instances for a group. This is necessary to ensure that scaling does not reduce the VM instances beyond the specified count.
Maximum Count: Enter the maximum number of VMs the group must scale to. VM Auto Scaling uses this as a reference value to stop adding new VM instances for a group. This is necessary to ensure that scaling does not increase beyond the specified count. To improve the efficiency of the VM Auto Scaling service, we recommend limiting the maximum number of VMs in an Auto Scaling Group to 100 or less.
A Policy defines the rules to trigger VM Auto Scaling to analyze the resource utilization rate at regular intervals. You can only define one metric policy per group that triggers the scaling process.
To define policies, go to the Configuration tab in the Create VM Auto Scaling Group window and specify the following:
Metric: Select a metric from the drop-down list whose performance must be monitored. The pre-defined values are based on the CPU utilization average or network bytes for incoming and outgoing bytes or packets.
Scale In Threshold: Enter a value to specify when VM Auto Scaling must trigger the scale in operation. The value specified here indicates the percentage of the CPU utilization rate or the network packets or network bytes, based on which the scale in action is triggered for the metric. For example, if you specify the CPU utilization rate as 30, VM Auto Scaling automatically begins scaling inwards and deletes the additional VM instances when the CPU utilization rate is 30%.
Scale Out Threshold: Enter a value to specify when VM Auto Scaling must trigger the scale out operation. The value specified here indicates the percentage of the CPU utilization rate or the network packets or bytes based on which the scale-out action is triggered for the metric. For example, if you specify the value as 70, the application automatically begins scaling outwards and adds additional VM instances when the CPU utilization rate reaches 70%.
Note: Ensure that the Scale In Threshold and the Scale Out Threshold field values differ by 40%. For example, if you set the Scale In Threshold to 15%, Scale Out Threshold cannot contain a value lesser than 55%.
Range: Enter a time range in hours, minutes, or seconds. Example: 1h, 3m, 120s. It is the period during which VM Auto Scaling measures the percentage of chosen metric utilization at regular intervals and automatically scales in or scales out based on the demand. If specifying in seconds, ensure that the value is not less than 120 seconds.
Unit: Select a unit from the drop-down list. You can specify whether the scaling process should be initiated every hour, minute, or second for other predefined metrics. This is automatically set to Total for an instance CPU utilization average metric.
Scale in defines the action triggered during a scale in operation. Based on the values defined, the feature automatically deletes the specified number of VM instances after the cooldown period.
To define scale in policies, go to the Configuration tab in the Create VM Auto Scaling Group window and specify the following:
Amount Type: Select a value from the drop-down list to define the number of replicas that must be deleted. You can choose either Percentage or Absolute.
Amount: Enter the number of VM instances to be deleted during a scale in operation. The minimum value is one. Scale in jobs with a large number of VMs may encounter performance issues. Hence, we recommend limiting the deletion of VMs to at most five, regardless of whether the Amount Type is absolute or percentage.
Cooldown Period: Enter the cooldown period to indicate the interval between each auto scaling action in the group. The cooldown period can be measured in minutes, seconds, or hours. For example, when the value is set to 5m, the scale in action is activated every 5 minutes. VM Auto Scaling automatically deletes the given number of VM instances when the resource consumption is lower.
Note:
Only one scaling action remains in progress for a VM Auto Scaling Group. The metric is reevaluated after the current scaling action completes.
The minimum value is two minutes, and the maximum value is 24 hours.
If specifying in seconds, ensure the minimum value is not less than 120 seconds.
The application considers the default value of five when a period is not specified.
Termination Policy: Select a value from the drop-down list to choose whether the oldest or the most recent replica must be deleted first. Choosing the Oldest replica first delegates the scaling process to delete the oldest replicas. Otherwise, choose the Youngest replica first to begin scaling by deleting the most recent replica.
Delete attached volumes: Select a value from the drop-down list to indicate if the attached volumes must be deleted. Choose Don’t delete to retain the attached volumes; otherwise, choose Delete.
Scale out defines the action triggered during a scale out operation. The feature automatically adds the specified number of VM instances after the cooldown period based on the demand.
To define scaling out policies, go to the Configuration tab in the Create VM Auto Scaling Group window and specify the following:
Amount Type: Select a value from the drop-down list to define the number of replicas added when the metric utilization exceeds the specified amount. You can choose either Percentage or Absolute.
Amount: Enter a number to indicate the number of VM instances that must be added. The minimum value is one. Scale out jobs with a large number of VMs may encounter performance issues. Hence, we recommend limiting the addition of VMs to at most five, regardless of whether the Amount Type is absolute or percentage.
Cooldown Period: Enter the cooldown period to indicate the interval between each auto scaling process in the group. The cooldown period can be measured in minutes, seconds, or hours. For example, when the value is set to 5m, the scale out process is activated every 5 minutes. VM Auto Scaling automatically adds the given number of VM instances when the resource consumption is higher. The notes mentioned in scale in policies are also applicable to scale out policies.