maintaining a specific number of instances across Availability Zones.

Net DNA 0 Reputation points
2023-09-21T04:18:15.32+00:00

In Azure, we have a VM Scale Set configured across three Availability Zones, with 2 VM instances in each zone, totaling 6VMs. If one of these Availability Zones (e.g., Zone 3) were to go down, would the remaining two zones automatically add one more VM instance each to maintain the total VM instance count at 6?

And if we enabled the AutoScale, and the default VM instances was set to 6. will that maintain the default instances count? or only if the metric (e.g CPU%) reached to a threshold configured in AutoScale settings?

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.
348 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. kobulloc-MSFT 23,496 Reputation points Microsoft Employee
    2023-09-22T01:24:28.6166667+00:00

    Hello, @Net DNA ! It looks like there was an answer by @subrothodas-9589 that was deleted that was largely on point (and we can restore this if it was an accident).

    How do we maintain a specific number of instances in a Virtual Machine Scale Set (VMSS) in multiple Availability Zones if there is an outage?

    In the scenario you mentioned where you have 6 instances evenly spread across 3 availability zones and zone 3 experiences a zonal outage, you would be left with 4 instances. You would need to add 2 additional instances and then remove them once the zonal outage was over.

    It is recommended to use autoscaling configured for CPU or memory usage which would automatically react to the outage (however it's important to note that this would reflect the CPU/memory threshold you set rather than a specific number of instances).

    You can read more here:

    https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-use-availability-zones?tabs=cli-1%2Cportal-2#zone-redundant-or-zone-spanning

    What happens in a zonal outage?

    In the event of a zonal outage or connectivity issue, connectivity to instances within the affected zone may be compromised, while instances in other availability zones should be unaffected. You may add capacity to the scale set during a zonal outage, and the scale set adds more instances to the unaffected zones. When the zone is restored, you may need to scale down your scale set to the original capacity.

    What is a best practice?

    A best practice would be to configure autoscale rules based on CPU or memory usage. The autoscale rules would allow the scale set to respond to a loss of the VM instances in that one zone by scaling out new instances in the remaining operational zones.


    I hope this has been helpful! Your feedback is important so please take a moment to accept answers.

    If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!

    User's image

    0 comments No comments