Questions on VMSS auto scaling

Anil Kumar 480 Reputation points
2024-08-09T09:16:39.5033333+00:00

Hello,

I had asked few questions in following post, got answer for only one question,

https://video2.skills-academy.com/en-us/answers/questions/1841869/seeking-clarification-on-vmss-auto-scaling

Could you please consider answering following questions ?

  1. If Max instance count is set to 10, how observed instance count is reaching 40 ?
  2. How can i see the accurate instance count for my VMSS ? Checked metrics but couldn't find what I was looking for.
  3. When Min and Max instance count are set to same value i.e. 10, how the instance count is changing?
  4. There is no condition defined for scale in and scale out, on what basis these scale operations are happening? How does Azure know it needs to scale out by 20 and scale in by 10? Doesn't Azure looks at Max instance count parameter before scaling out?
  5. Doesn't Azure validate JSON file for auto scaling? When I can not create VMSS with same Min and Max count, I should not be allowed to do that by JSON as well.

Appreciate your insightful response.

Thank you!

Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
384 questions
0 comments No comments
{count} votes

Accepted answer
  1. Prrudram-MSFT 24,366 Reputation points
    2024-08-12T11:37:15.8766667+00:00

    Hello @Anil Kumar

    I'd be happy to help answer your questions:

    1. If Max instance count is set to 10, how observed instance count is reaching 40? It's possible that there is an issue with the configuration of your VMSS or with the metrics that you are using to monitor the instance count. Without more information, it's difficult to say exactly what is causing the observed instance count to reach 40. I would recommend reviewing your VMSS configuration and the metrics that you are using to monitor the instance count to ensure that they are set up correctly.*
    2. How can I see the accurate instance count for my VMSS? Checked metrics but couldn't find what I was looking for. You can use the Azure portal or Azure CLI to view the current instance count for your VMSS. In the Azure portal, navigate to your VMSS and select the "Instances" tab. This will show you the current instance count and the status of each instance. You can also use the Azure CLI to view the instance count by running the command "az vmss list-instances". This will show you the current instance count and the status of each instance.
    3. When Min and Max instance count are set to the same value i.e. 10, how is the instance count changing? If the Min and Max instance count are set to the same value, the instance count will not change automatically. You will need to manually add or remove instances to change the instance count.
    4. There is no condition defined for scale in and scale out, on what basis are these scale operations happening? How does Azure know it needs to scale out by 20 and scale in by 10? Doesn't Azure look at the Max instance count parameter before scaling out? Azure uses the autoscale rules that you have defined to determine when to scale out or scale in the VMSS. The autoscale rules are based on metrics that you have selected, such as CPU usage or memory usage. When the metric values exceed the threshold that you have defined in the autoscale rule, Azure will scale out the VMSS. When the metric values fall below the threshold, Azure will scale in the VMSS. The Max instance count parameter is used to limit the maximum number of instances that can be created in the VMSS, but it does not affect the autoscale rules.
    5. Doesn't Azure validate JSON file for auto scaling? When I cannot create VMSS with the same Min and Max count, I should ot be allowed to do that by JSON as well.
      Azure does validate the JSON file for auto scaling, but it may not catch all configuration errors. In some cases, it may be possible to create a JSON file with the same Min and Max count for a VMSS, but this configuration will not work correctly when the VMSS is deployed. To avoid this issue, you should always follow the best practices for configuring a VMSS, including setting the Min and Max count to different values. If you encounter an error when deploying a VMSS with a JSON file, you should review the error message to determine the cause of the error and make the necessary changes to the JSON file to correct the error.

    If I have answered your query, please click "Accept as answer" as a token of appreciation


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.