Difference in Azure Availability Sets and Scale Sets
Asked Answered
D

7

28

Can someone define the difference between the two in the ARM portal. Also what would be the PowerShell if i need to add a new Azure RM VM to a existing AS(Availability Set)? Thanks Prab

Deckard answered 30/6, 2016 at 2:4 Comment(0)
L
40

An availability set consists of a set of discrete VMs which have their own names and individual properties, but are spread across fault domains, which means when you have more than one VM in a set it reduces the chances of losing all your VMs in event of a hardware failure in the host or rack.

A scale set consists of a set of identically configured VMs, also spread across fault domains (in fact a scale set is an implicit availability set with 5 fault domains).

The main difference in scale sets is that, them being identical, makes it very easy to add or remove VMs from the set while preserving high availability, which in turn makes it easy to implement autoscale, and to perform operations on the whole set or a subset of VMs. There are also API calls that support re-imaging and upgrading VMs, allowing you to roll out an update while keeping the service running. They are useful for cloud architectures which require deploying large numbers of similar VMs, or need to be elastic. A typical architecture might use a scale set for agent or worker nodes, and an availability set for master or control nodes. See https://azure.microsoft.com/en-us/services/virtual-machine-scale-sets/ for more detail.

For your question about adding a new VM to an existing AS, see Azure Resource Manager: move VM to availability group and https://gallery.technet.microsoft.com/Set-Azure-Resource-Manager-f7509ec4

Laky answered 11/7, 2016 at 6:36 Comment(3)
But i think the AS also needs identical sets of VMs according to MS. Is that not correct?Deckard
VMs in an AS don't have to be identical, though it often makes good sense to be. For example you could have 2 VMs running database servers in an AS. One configured as a database replication Primary and one configured as a Secondary. Being in an AS provides availability guarantees for the 2-VM database solution, but the VMs can have their own names, public IP addresses, and even be different sizes.Laky
Adding a comment to my comment. Scale sets now support public IP addresses per VM (in preview at time of writing). You can also have scale sets containing different sized VMs, but a scale set always has a current "model" which defines the VM size and other properties, which can be applied to the set, or a subset of VMs depending on upgradePolicy settings. Scale set VM machine names always consist of the same name prefix, followed by a number, compared to an availability set which can have individually named VMs.Laky
W
27
  1. The main difference is that Scale Sets have Identical VMs where in Availability Sets does not require them to be identical.

  2. Availability set, in concept, are for enhancing application availability in case one primary VM fails/needs update another VM from Fault/Update domain can be provisioned

    Scale sets on another hand, in concept, are designed for automatic scaling (horizontal) in application where load can vary extensively to fulfill more compute needs.

  3. Provisioning new VM in Azure when needed is easier for Scale sets as all other VMs are same in all aspects & replica of one golden copy.

For more details refer:

https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/

https://learn.microsoft.com/en-us/cli/azure/vm/availability-set?view=azure-cli-latest

Washerman answered 14/1, 2018 at 22:44 Comment(0)
B
8

After reading all of the answers here, I still didn't feel confident in my knowledge. I got the impression that a scale set would be safe because it had multiple fault domains by default, but couldn't understand why people were still going for availability sets.

To put my mind at ease, I hacked around with the azure CLI and found that you can run this command to list the instances of your scale set and actually verify they are in different fault domains:

az vmss get-instance-view --subscription "your-subscription-id" \ 
--resource-group "your-rg" --name "your-scale-set-name" \
--instance-id "*" | grep platformFaultDomain
    "platformFaultDomain": 0,
    "platformFaultDomain": 1,
    "platformFaultDomain": 2,
    "platformFaultDomain": 4,
    "platformFaultDomain": 0,
    "platformFaultDomain": 1,
    "platformFaultDomain": 3,
    "platformFaultDomain": 4,
    "platformFaultDomain": 2,
    "platformFaultDomain": 3

Hope that puts someone else's mind at ease as well!

I provided some more info and links here as well if you're interested in further resources: https://coding-stream-of-consciousness.com/2019/02/27/azure-scale-set-vs-availability-set/

Buccaneer answered 27/2, 2019 at 1:41 Comment(0)
W
5

A scale set is an implicit availability set with five fault domains and five update domains. Scale sets of more than 100 VMs span multiple placement groups, which are equivalent to multiple availability sets.

For more information about placement groups, see Working with large virtual machine scale sets. An availability set of VMs can exist in the same virtual network as a scale set of VMs. A common configuration is to put control node VMs (which often require unique configuration) in an availability set and put data nodes in the scale set.

Willie answered 23/3, 2018 at 7:39 Comment(0)
D
2

Availability set is a predecessor of scale set. It will eventually be replaced although right now they are created in conjunction. What's more scale sets introduce autoscaling.

Deepseated answered 25/11, 2016 at 13:36 Comment(1)
I'm not sure that one will replace another, those are two different solution for 2 different problems. it's clear that if you are interested in Scale Set your will want to have Availability Set as well but the inverse it's not always true.Obliterate
A
2

incorrect, AVSETs have 1 goal and that is to protect against downtime. Scale Sets are a special kind of VM where a single golden image is used for horizontal scaling needs.

Agamemnon answered 29/12, 2017 at 12:38 Comment(1)
I'm wondering as well to this point, for example if you have a problem with you "Image" and want to debug separately it's just impossible in Scale Set, the think that I don't like about Scale Set it's the concept all works or nothing works.Obliterate
G
0

Availability set is hardware protection in the data center that is hosting your VM.

Scale set provisions more instances according to pre-defined metrics.

• One needs to create/define each of the VMS and Load balancer within the Availability Set explicitly. Further, scaling based on metrics, schedule is NOT available in Availability Set.
(While LB is still created to be explicitly, it is integrated with metrics,schedule based scaling for VMSS)

main solution idea
Use Availability Set for predictable workloads. In other words, if you know your solution can run on a single VM, you would create two VMs in an availability set to ensure that at least one VM is running at all times, and a load balancer to route traffic to an active VM.

Use VMSS for unpredictable workloads (autoscale).For example, if you have a solution that normally works using 1 VM but may need upto 5 VMs under heavy demand.

Virtual Machine Scale Sets supports three zonal deployment models, in addition to support for FD/UD-
Zonal (single zone) ; Zone Redundant(spans across all/chosen zones) or “Regional “ (No explicit zone is set- There is no guarantee for balance or spread across zones, or that instances land in the same availability zone).

Such zone level HA is NOT available under Availability Set(which is contrasted to Availability Zones). Availability sets only have concept of FD and UD.

NOTE- While initially, VMSS had to have Identical VMs whereas Availability Sets does not require them to be identical; this has changed with introduction of “Orchestration Modes” in VMSS which allows mixing of non identical VMs.

Gonfalon answered 23/1 at 16:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.