Hello Rajiv Bansal
Yes, if a zone goes down, the VMSS will automatically create a VM in another available zone. The amount of time it takes for this to happen depends on a number of factors, including the size and complexity of your VM, the current load on the VMSS, and the availability of resources in the other zones. However, it typically takes only a few minutes for a new VM to be created and provisioned.
Here is a more detailed explanation of what happens when a zone goes down:
- Azure monitors the health of all zones and VMs in a VMSS.
- If a zone goes down, Azure will automatically detect the failure.
- Azure will then attempt to restart the VM in the failed zone.
- If Azure is unable to restart the VM in the failed zone, it will create a new VM in another available zone.
- Azure will then copy the state of the old VM to the new VM.
- Once the new VM is ready, Azure will switch traffic to the new VM.
This process is typically very fast and transparent to the end user. However, there may be a brief period of downtime while the new VM is being created and provisioned.
To minimize the impact of a zone failure, you can use the following best practices:
- Use a zone redundant VMSS. This will ensure that your VMs are distributed across multiple zones, so that if one zone goes down, your VMs will still be available in other zones.
- Use auto scaling. This will ensure that your VMSS automatically scales up to meet demand, even if a zone goes down.
- Use a load balancer. This will distribute traffic across your VMs, so that if one VM goes down, traffic will be automatically routed to other VMs.
I hope this helps! Let me know if you have any other questions.