Share via

VMSS Flex and max distribution

MikeD 41 Reputation points
2021-11-19T12:06:40.607+00:00

I have been comparing the portal with the Azure CLI for VMSS Flex.
In the portal you can specify max or fixed spreading.

The documentation states that the FD Count can be set to "2-3 FDs (depending on regional maximum FD Count); 1 for zonal deployments"

It also states that:
"You can choose the number of fault domains for the Flexible orchestration scale set. By default, when you add a VM to a Flexible scale set, Azure evenly spreads instances across fault domains."
https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-orchestration-modes?context=/azure/virtual-machines/context/context

For Uniform orchestration (I haven't found VMSS Flex equivalent documentation) it states that:
"- Max spreading (platformFaultDomainCount = 1)

My interpretation of this in the CLI is as follows.

$ az vmss create --resource-group myvm-resource-gp --name myScaleSet --orchestration-mode flexible --platform-fault-domain-count 1

My assumption is this command line is equivalent to using an AvailabilitySet since it doesn't autoscale as there is no image to use. Interestingly, the portal forces you to provide an image. However, the CLI forces you to provide a platform-fault-domain-count value and I assume that setting it to 1 means it uses max spreading on a single zone chosen by Azure.

Am I correct in my interpretation and why does it not just default the platform-fault-domain-count to 1 since if you do provide an --image flag then the FD Count is not required (I guess it is defaulted to 1 in this case)?

Also is "max distriubtion" and "zonal deployment" effectively the same thing? If you do not provide any zones then the VMs are just distributed over the one zone, otherwise if you provides zones (--zones) they are distributed over multiple zones. Hence, FD count = 1 really means max distribution in both cases.

Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets

Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.


Answer accepted by question author

vipullag-MSFT 26,537 Reputation points Moderator
2021-11-30T07:26:48.093+00:00

@MikeD

Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused.

Please find the details for your queries below:

I interpret this as supporting the argument that not providing an --image flag (i.e. no auto scaling profile) or providing a capacity=0 is the equivalent to setting up an Availability Set. Given that you "must specify the fault domain count" the implication must be that CLI is defaulting to a fault domain count of 1 if you provide an --image flag.
You are correct; with no image flag, or just set capacity to zero, you can use VMSS as you do AvSet today (although with zone support and larger scale and better deployment latency and reliability). You are also correct CLI defaults to FDCount=1

I am still unclear whether setting fault domain count = 1 without providing zones is actually max spreading in a default zone.
FDCount=1 with no zones is max spreading. The current implementation limits instances to a zone, although it is expected that constraint will be changed in future updates. You should not take dependency that non-regional deployments will all land in the same zone.

Hope this helps.
Please 'Accept as answer' if the provided information is helpful, so that it can help others in the community looking for help on similar topics.

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. MikeD 41 Reputation points
    2021-11-26T12:25:06.957+00:00

    I have found a little more documentation on this
    https://learn.microsoft.com/en-us/azure/virtual-machines/flexible-virtual-machine-scale-sets-migration-resources
    There is a section titled Update availability set deployments templates and scripts
    It states that:

    "First, you need to create a virtual machine scale set with no auto scaling profile via Azure CLI, Azure PowerShell, or ARM Template. Azure portal only allows creating a virtual machine scale set with an autoscaling profile. If you do not want or need an autoscaling profile and you want to create a scale set using Azure portal, you can set the initial capacity to 0.

    You must specify the fault domain count for the virtual machine scale set. For regional (non-zonal) deployments, virtual machine scale sets offers the same fault domain guarantees as availability sets. However, you can scale up to 1000 instances. For zonal deployments where you are spreading instances across multiple availability zones, the fault domain count must be set to 1."

    Later it states:
    "The last step in this process is to create a virtual machine. Instead of specifying an availability set, specify the virtual machine scale set. "

    I interpret this as supporting the argument that not providing an --image flag (i.e. no auto scaling profile) or providing a capacity=0 is the equivalent to setting up an Availability Set. Given that you "must specify the fault domain count" the implication must be that CLI is defaulting to a fault domain count of 1 if you provide an --image flag.

    I am still unclear whether setting fault domain count = 1 without providing zones is actually max spreading in a default zone.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.