Azure VM Scale Sets is a service that provides a set of load-balanced VMs in the Azure cloud. All VMs in a set are created using a single configuration definition and are treated as a single logical unit. Additionally, VM Scale Sets is a technology underneath Microsoft’s Azure Service Fabric and Azure Batch. Azure VM Scale Sets are often referred to as the successor to the legacy Classic Azure Cloud Services (Web/Worker cloud roles)
Netreo provides monitoring, automation and auto-scaling capabilities for Azure VM Scale Sets, you can learn more about it here. In this article, we’ll describe how to automatically scale VM Scale Sets based on CPU and memory utilization. The same approach can be applied to auto-scaling based on ASB queue or topic depths, and other performance indicators.
If you aren’t using Netreo yet, request a demo to have a sales representative, show you the view of an Azure subscription. Learn more about the setup process here.
Netreo can automatically add and remove VM instances within a Scale Set based on user-defined conditions.
Netreo defines two auto-scaling rules in the default template for monitoring Azure Windows VM Scale Sets based on CPU utilization:
These auto-scaling rules are disabled by default, they must be explicitly enabled to become active.
In this example, we’ll modify the default rules so the VMSS are also scaled up when the memory utilization exceeds 70 % and scaled down when the memory utilization drops below 20%:
It may be beneficial to ensure that the number of instances in a Scale Set never exceeds or drops below certain thresholds. This can be done by defining Scale Ranges.
Netreo includes an Overall Scaling Limit rule in the default monitoring templates for Scale Sets, which ensures there are never less than 3 VM instances in the set. The rule must be explicitly enabled to become active:
Netreo can also auto-scale Azure VM Scale Sets based on other signals captured anywhere in your Azure environment, for example, based on queue lengths. Read this article to learn more.