Autoscale Azure Virtual Machine Scale Set

 

Autoscale Azure Virtual Machine Scale Set:

Auto scaling feature enables you to dynamically allocate or remove resources based on the load on the services/application. You can mention the number of instances to run and add or remove VM's based on a scale set of rules.

There could be many reasons for Increase / Decrease the instances. Here are few examples:

Case 1 : You have an application running with heavy load everyday during 3PM to 5PM.So you would like to increase the instances during that time. Outside this window the your application usage is less and you want to reduce the instance count to save cost.

Case 2:Your customer is releasing a new product on your application on next week (date specific). So during the heavy peak season , you wna to increase the CPU count for those 2 days.

Case 3:You want to increase the Instance count when there is unpredictable performance fluctuations in these environment of your application.

Virtual machine scale set scaling options:

In Azure, there are 3 options for scaling VM instances up and down. 

  • Manually through the Azure portal

  • Auto scale based on metrics

  • Auto scale based on a defined schedule

You can configure scaling options either at the time of creating the virtual machine scale set or existing VM’s. You can configure in scaling tab to enable policy during VM creation. See below


Manual Scale set though Azure Portal :

Go to >Virtual machine scale set>Scaling>Increase the Instance count to scale manually in the box>Save

Auto scale based on metrics:

The below auto-scale condition will increase the VM instance count by 1, when the average CPU utilization is greater than 70%. The instance count is decreased by 1, when the average CPU utilization falls below 25%.

Auto scale based on a defined schedule:

Scale set to increase the instance count on specific day / time schedule


You will get a below error if you have not register 'Microsoft.insights' to your azure subscription.

Failed to update configuration for 'vmss-demo'. {"error":{"code":"MissingSubscriptionRegistration","message":"The subscription is not registered to use namespace 'microsoft.insights'. See https://aka.ms/rps-not-found for how to register subscriptions.","details":[{"code":"MissingSubscriptionRegistration","target":"microsoft.insights","message":"The subscription is not registered to use namespace 'microsoft.insights'. See https://aka.ms/rps-not-found for how to register subscriptions."}]}}.

Go to Home> Subscription >Resource Providers>Search "Microsoft.Insights">Register




                                                             Thank you !!!

 

Comments

Popular posts from this blog

AZCopy : Upload and Download files from or to Azure Storage account using AZcopy

Auto-Stop Virtual Machines based on CPU utilization