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)? Tha
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 is scale sets, being identical, make 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
The main difference is that Scale Sets have Identical VMs where in Availability Sets does not require them to be identical.
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.
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://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/
https://docs.microsoft.com/en-us/cli/azure/vm/availability-set?view=azure-cli-latest
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.
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/
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.
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.