0
votes

I am having difficulty understanding Azure Availability sets, specifically, what exactly i need to to do ensure my app running on my vm is utilizing Availability sets to be more available.

Lets say i am creating an application that runs on a single VM and i want to make it more resistant to hardware failure.

Option 1: I create an Availability Set with 2 fault domains and then create a VM on this Availability set.

Is that it? If there is a hardware failure on the rack hosting my VM, does azure now take care of ensuring the VM stays up and running?

Option 2: i have to have two servers Vm1 & Vm2, both in the availability set but one on fault domain 1, one on fault domain 2. i have to then set up a cluster of sorts for my application. In this case the availability set is simply allowing me to be sure that the two servers in my cluster are not on the same hardware, but the plumbing to ensure the application can take advantage of two servers and is highly available is still down to me.

Is option 1 or option 2 the correct way in which Availability Sets work in relation to fault domains?

Appreciate any clarity that can be provided.

2

2 Answers

1
votes

Azure deals with hardware failure in two ways, Availability Sets and Availability Zones. AS is all about making sure that your app does not go down even if hardware failure happens within a Data center aka Zone itself. AZs are all about making sure your app does not go down even if the whole data center aka Zone is down. More details here.

Now to understand best practices around availability take a look at the best practices, specifically for VMs can be found here.

A Single VM instance is defined as follows, reference:

"Single Instance" is defined as any single Microsoft Azure Virtual Machine that either is not deployed in an Availability Set or has only one instance deployed in an Availability Set.

So one VM in or not in an availability set does not make any difference, for this you need at least two VMs and which are in an AS using FDs and UDs so Azure will take care of this by making sure that both VMs are running on separate Hardware to avoid your app going down.

0
votes

One VM in an Availability set is nearly as good as a VM with no Availability set. If you are placing two or more VMs in an AS and those are identical then you can add a load balancer to distribute traffic. You can also use AS without a Load balancer if you are not interested in traffic distribution. One scenario can be where you want to switch to a secondary VM only when primary is unavailable. Also, do understand it is not required to have identical VMs in an AS.

Virtual machine scale set is a good option if you are looking for a high availability solution with VMs.