Virtual Machine Availability Sets in Azure

[Setting up a VM cluster within an Availability Set]

The Scope

  1. Standalone VM — 99.9% availability (8.76 hours downtime per year)
  2. Availability Sets — 99.95% availability (4.38 hours downtime per year)
  3. Availability Zones — 99.99% availability (52.56 min downtime per year)

In this blog, I will be focusing only on “Availability Sets” and how it can help to improve availability of your cloud applications.

Availability Sets

If a hardware or software failure happens, only a subset of your VMs are impacted and your overall solution stays operational. Availability Sets are essential for building redundancy for your cloud solution.

Each VM in an Availability Set is assigned an Fault Domain and an Update Domain by the Azure Platform.

Fault Domains

If you have multiple tiers in your application, you can place your VMs such a way that each fault domain get a VM of each tier (See Figure 01).

You can have up to three (03) fault domains.

Figure 01 — Fault Domains

Update Domains

Update domains are used for patching of VMs. Once an update domain carries out a patching process all VMs within the update domain will get rebooted. At any given point only one update domain is updated.

You can have up to twenty (20) update domains.

VM Distribution

VMs are assigned sequentially in the fault domains and update domains (See Figure 02).

Figure 02 — VM Distribution

Creating a VM cluster with an Availability Set

Search for Availability Sets and click “New” button to create a new Availability Set. You may enter number of fault domains and update domains while creating it along with other parameters (Subscription, Resource Group, Name, Region). Pls keep Managed Disk as “Yes” as well..

Figure 03 — Creating an Availability Set

Step 2: Creating a few Virtual Machines and attaching them to the created Availability Set

Now, it is time to create some VMs and assign them to the same Availability Set that you created under step 01.

Please make sure to select “Availability Set” under the “Availability Options” and select the availability set that you created. Furthermore, please make sure to choose the same Azure Region for all VMs being created.

VMs created: vm-1, vm-2, vm-3 (three VMs)

Figure 04 — Creating a Virtual Machine with an Availability Set

Step 3: Monitoring the Availability Set

Go to “Home” -> Select “Availability Sets” -> Select the availability set that you created under step 01.

You will see fault and update domain distribution as follows (See Figure 05).

Figure 05 — Availability Set Domain Distribution

Congratulations! you have now created a VM cluster within a single Availability Zone, which has 99.95% availability.





Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store