Do VMs in Azure Availability Set automatically replace the one which goes down?

newhdanalyst 51 Reputation points
2024-08-13T01:20:04.86+00:00

I put two VMs in Azure Availability set.

I see both are running.

vm1 I don't see any fault domain or update domain for.

vm2 I see fault domain 1 and update domain 1

if vm1 goes down would vm2 automatically starts receiving user's connection requests and when vm1 is back up does it takes its place again?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,793 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vlad Costa 1,480 Reputation points
    2024-08-13T01:34:24.8633333+00:00

    Hi @newhdanalyst

    Azure Availability Sets are designed to ensure high availability for your VMs by distributing them across multiple fault domains and update domains. However, they do not automatically replace a VM that goes down. Instead, they help minimize the impact of hardware failures, network outages, or maintenance events.

    In your case:

    • VM1: If you don’t see any fault domain or update domain, it might not be correctly configured within the availability set.
    • VM2: Being in fault domain 1 and updating domain 1 means it’s correctly placed within the availability set.

    If VM1 goes down, VM2 will not automatically start receiving user connection requests unless you have a load balancer configured to distribute traffic between the VMs. When VM1 comes back up, it will resume its role, but again, traffic distribution depends on your load balancer configuration.

    Consider setting up an Azure Load Balancer in front of your VMs to ensure seamless failover and load distribution. This way, if one VM goes down, the load balancer can redirect traffic to the remaining healthy VMs.

    Reference:
    https://video2.skills-academy.com/en-us/azure/virtual-machines/availability-set-overview

    https://video2.skills-academy.com/en-us/azure/virtual-machine-scale-sets/flexible-virtual-machine-scale-sets-migration-resources


    If this answers your question, please click Accept Answer and Yes if this answer was helpful. Doing so would help other community members with similar issues identify the solution. I highly appreciate your contribution to the community.


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.