Scaling in Azure | VM Scale sets and Auto Scaling

In this article, you will be learning about concepts of Scaling in Azure portal. We will start with types of scaling, and later, we will see scale sets and the options available in Auto Scaling. This is in continuation to my previous article on availability sets and availability zones, which is a similar option without an auto-scaling feature. Depending on the demand and the type of application, you can use either of these two features.

Typically, scaling options are used in online shopping apps, ticket booking apps, or even online streaming apps where the demand or the no. of hits is unpredictable, like a Big Billion day Sale on Amazon or, on the release of a new season of a famous series on Netflix. Demand on such days or events is unpredictable; scaling comes into the picture, optimizing both user experience and your costs according to the demand and usage. Let’s take a look at how it works.

What is Scaling ?

Scaling is an option in azure to increase or decrease your resources on-demand as needed across different zones to provide a seamless experience to the end-users; you can either increase the computational resources of the existing VM or increase the no. of VM’s with the same configuration.

What are the types of Scaling in Azure ?

Vertical Scaling:

This type of scaling increases your computational resources on an existing VM like increasing memory, storage, etc. In this type, the scaling is on a single Instance. It is a manual process. No. of VM’s in vertical scaling always remain the same. In short, it can make your VM more or less powerful.

Horizontal Scaling:

In Horizontal scaling, you increase the no. of VM instances, unlike vertical. Therefore no. of VM instances are not the same all the time. They increase or decrease automatically depending on the conditions we provide during configuration. It can be either Manual or Automated, or both.


Horizontal scaling in azure is considered the flexible option amongst both, and it is used in Autoscaling. Vertical scaling has more limitations compared to horizontal scaling. Vertical Scaling requires you to stop the VM and restart.

Scaling in Azure | VM Scale sets and Auto Scaling 1
Scaling in Azure | Scale sets and Auto Scale
Scaling in Azure
Scaling in Azure | Scale sets and Auto Scale

Understanding VM Scale Sets

VM Scale sets are used to deploy identical sets of VM Instances. i.e., when you enable scaling in azure, VM Instances deployed will have the same Configuration as memory and storage. Scale sets will also increase (Scale-Out) VM’s or decrease (Scale In) VM’s as and when the demand increases or decreases. A scale set can be automatic, manual, or both.


Scale-Out: It’s a term used for increasing VM’s while scaling in azure.
Scale In: It’s a term used for decreasing VM’s while scaling in azure.

Auto Scaling in Azure

Assuming you understood the VM Scale set if a virtual machine scale set is created to automatically adjust to the demand, i.e., to create and remove VM’s automatically, it is called Auto Scaling.

  • You can define rules to automatically adjust the capacity.
  • You can Scale out (increase) or Scale In (decrease) the number of VM’s in the set.
  • You can schedule events to increase or decrease VM’s at a specific time period.
  • It reduces the monitoring time and optimizes the performance of the application.
  • Minimum no. of 2 instances of VM are required for auto scaling.
Scaling in Azure | VM Scale sets and Auto Scaling 2
Scaling in Azure | VM Scale sets and Auto Scaling | Picture Credits: Microsoft

Options for Implementing Auto scaling in Azure

Let’s take a look at the auto-scaling options that are available in azure. If you look at the image below, these are the options you will see in the scaling section while creating the Virtual Machine Scale Sets. Let’s take a look at what they are and how they work.

Scaling in Azure | VM Scale sets and Auto Scaling 3
Scaling in Azure | VM Scale sets and Auto Scaling

The above example shows the CPU threshold as the condition. You can set more advanced options of scaling, including events. The Below points will tell you what each option means in the example above.

  • In the scale out section, it is set to increase the no. of VM’s by 1 if the average CPU threshold of the VM’s is higher than 75% for more than 10 mins.
  • Similarly in the scale in section, it is set to decrease the no. of VM’s by 1 immediately , if the average CPU threshold of the VM’s is lower than 25%.
  • You can also set the minimum no. of VM’s and maximum no. of VM’s that you would like to create during auto scaling.

Resources

Leave a Comment

Your email address will not be published. Required fields are marked *