Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Availability Set vs Affinity Group

Tags:

azure

I'm a little bit confused about when to use Azure Availability Set and when to use Azure Affinity Group.

like image 397
Mahmoud Samy Avatar asked Aug 24 '14 14:08

Mahmoud Samy


People also ask

What is affinity group in Azure?

An affinity group puts your services and their resources together in an Azure datacenter. The affinity group groups members together for optimal performance. Define affinity groups at the subscription level. Your affinity groups are available to any subsequent cloud services or storage accounts that you create.

What is the difference between availability zone and availability set?

Ultimately, availability zones are used to protect applications from entire Azure data center failures, while availability sets are used to protect applications from hardware failures within an azure datacenter.

What is Azure availability set?

An availability set is a logical grouping of VMs that allows Azure to understand how your application is built to provide for redundancy and availability. We recommended that two or more VMs are created within an availability set to provide for a highly available application and to meet the 99.95% Azure SLA.

What problem does a availability Set solve?

Availability set provides redundancy for your virtual machines. Availability set spreads your virtual machines across multiple fault domains and update domains. If you want to leverage Microsoft's 99.95% SLA from Microsoft you must place your VMs inside availability set except your VMs are having premium storage.


1 Answers

Lets look at the key purpose of Availability set and Affinity Group briefly to begin with.

Availability Set: is predominately to provide High Availability for your deployment. Azure does this via Fault domains and Upgrade domains.

A fault domain: is basically a different hardware rack in the same datacenter. The solution will be deployed in two different hardware racks.

Upgrade domains: is exactly same like fault domains in function, but they support upgrades rather than failures. The Upgrade domain is a logical unit of instance separation that determines which instances in a particular service will be upgraded at a point in time.

Affinity Group: In order to explain it, we need to take peek into Azure DC . Windows Azure Data Centers are purpose build , you might see rows and rows of containers (something like shipping containers) that contain clusters and racks. Each of those Containers have specific services, for example, Compute and Storage, SQL Azure, Service Bus, Access Control Service, and so on. Those containers are spread across the data center.

When you deploy a service using Portal or PowerShell , the service will talk directly to RDFE (Red Dog Front End). The RDFE controls the DC and nodes. The Cluster of nodes is controlled by Fabric Controller.. When you specify Affinity Group , the Fabric controller will place all the required elements of a deployment together. This has number of advantages like reducing latency (since required elements are close together) , Networking.

There are new changes brought in related to Network Affinity group , you can refer them (https://azure.microsoft.com/en-us/documentation/articles/virtual-networks-migrate-to-regional-vnet/).

To address you question

  1. You would use Availability set when you want to have Highly Available system and also want to have SLA for Compute. Without Availability set there wont be SLA for your VM or PaaS Instances in other words will single instances of VM (IaaS) and PaaS wont have SLA and prone to downtime during HW failure and Upgrades of OS.

    Availability set can be implemented after the deployment as well. Do note there is cost associated with the Availability set , since you are running additional instances , so they will be charged.

  2. Affinity group you need to include them at the time of Creation of the services . It cannot be updated after the creation. So it very important to include Affinity group at the time of creation. There is no additional charges for including Affinity group.

Do share your feedback if the response addresses your question.

like image 118
Krishna Azure Avatar answered Oct 02 '22 05:10

Krishna Azure