Azure basics: Availability sets


What are availability sets in Azure?

In a nutshell, they are a way to define declaratively policies about how your services (VMs, Apps, etc.) are deployed in order to ensure high availability.

To get more specific, you need to understand two more concepts:  Fault Domain & Update Domain.

Two physical machines in a Fault Domain share a common power source and network switch.  This means that when there is a physical fault, an outage, all machines on the same fault domain are affected.  Conversely, two machines in two different fault domain shouldn’t fail at the same time.

Update Domain, on the other hand, define a group of machines that are updated at the same time.  Azure has automatic maintenance patches requiring reboots.  Machines on the same update domain will be rebooted at the same time.

So, if you understand those two concepts, you will realize that if you want your solution to be highly available, you’ll want to avoid to either:

  • Have all instances of the same service on the same fault domain (a physical outage would affect both instances)
  • Have all instances of the same service on the same update domain (a planned maintenance would take them both down at the same time)

This is where availability sets come in.  Azure guarantees that an availability set has:

  • 5 Update Domains
  • 2 Fault Domains

Those are defaults and can be modified, to an extend.

So by defining the instances of your services to belong to an availability set, you ensure they will be spread on different fault and update domains.

Conversely, you’ll want the different tiers of your solution to belong to different availability sets.  Otherwise, it could happen (depending how the update & fault domains are distributed among the instances, which you do not control) that all the instances of the same tier be rebooted or failed at the same time.

Summary

Those were the two big rules with availability set, which you could coalesce in one:

Define an availability set per application tier, have more than one instance per tier and load balance within a tier.

 

Advertisements

8 thoughts on “Azure basics: Availability sets

  1. Pingback: Virtual Machine with 2 NICs | Vincent-Philippe Lauzon's blog

  2. Pingback: Single VM SLA | Vincent-Philippe Lauzon's blog

  3. Pingback: Azure Managed Disk–Overview | Vincent-Philippe Lauzon's blog

  4. Jason

    Vincent,
    In order to have 2 Windows VM with HA.

    Availability Set seems to be the right option.
    However, to have Scalability as well please suggest if Availability set will do the job or do I need VMSET.
    if VMSET, my vierw so far is its required when you have more numbers of VM running at once ( not in case of 02 VM)
    Still, if VMSET will be applicable from the Scalability standpoint.
    Please confirm If I need to have availability set as well?

    Thanks in advance.

    Reply
    1. Vincent-Philippe Lauzon Post author

      Hi Jason,

      Availability Set & VM Set serves two different purposes. The former ensures reliability of the overall service (as discussed in the article) while the latter allows you to manage multiple “identical” VMs as a single unit.

      Scale Sets require automation since it is the Scale Set service that spins VMs up when you change the “number of instances” property on the set. So if you can stomach the automation, you’ll have a very flexible solution where you can bring new instances up easily and drop them easily also. Otherwise, you can use normal VMs and configure them manually.

      Reply
      1. Jason

        Vincent, I`m fine with performing Automation.
        However, not clear yet with the Azure VM Scale set features.
        a) If I set Windows based VM Scaleset with custom application installed on the first instance.
        Will the next VM will have the VM with the custom app on it?
        (we are not using Containers, as quite small firm to think of investing in that area)
        b) If yes, so do I still need availability server (to take care from Update and Fault domain) or its a default feature of VM scale set?

        Thanks in advance for your assistance.

        Jason

        Reply
  5. Pingback: Azure Virtual Machines Anatomy | Vincent-Philippe Lauzon's blog

  6. Vincent-Philippe Lauzon Post author

    Scale set is for set of identical machines. You have one ARM template for the entire set including hooks to your automation (e.g. CHEF VM extension). So all your VM will get the same software stack installed on them.

    Typically this is good for Web Front end, Worker process farm & the like: identical machines. It isn’t the right tool to deploy different app tiers.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s