none
when adding VMs to a LB do these VMs have to be in a availability set or can they be in a availability zone? RRS feed

  • Question

  • when adding VMs to a LB do these VMs have to be in a availability set or can they be in a availability zone?

     I am wondering because a availability set is created before VMs are created.  Next the VMs or the availability set are added to the LB as individual nodes?

    With availability zones these nodes are added to LB individually ( no availability set ).

    I am unclear if the VMs are added on the LB backend as individual VMs or as a availability set ( group of VMs )?   The availability set being placed within the same datacenter unlike the availability zone (configured during VM creation).


    dsk

    Tuesday, October 22, 2019 7:03 PM

All replies

  • Hello,

    Please find below clarification on your queries:


    When adding VM to LB you can either have them in Availability set OR in Availability zone. You can't use Availability set and Availability Zone together (Availability zone is not present in all regions).

    Possibilities of VM being added to LB: Individual VM (Single VM), Availability set and Virtual machine scale set(VM addition to LB is managed by platform internally). 

    Only VMSS has multizone option (where the platform takes care of spreading the VM's across zones). Here all the identical VM's are load balanced. Check this document for more details. Where as availability set has discrete VMs. So these are decided based on the use case.

    Also, below threads are similar to your query. Requesting you to go through them once if they can help in avoiding the confusion:

    Availability Zone in Availability Options

    Can Availability sets and zones be used together

     

    Below is some additional information that I am referring for your deeper understanding:

    From this FAQ document, below statement gives the key difference between VMSS and Availability Set.

    Another reason you might create a virtual machine scale set with fewer than two VMs is if you're concerned less with availability than in using an availability set with discrete VMs. Virtual machine scale sets give you a way to work with undifferentiated compute units that are fungible. This uniformity is a key differentiator for virtual machine scale sets versus availability sets. 

    If the suggested answer helped you to solve your query, do click on "Mark as Answer" and "Up-Vote" to the answer that helped you for the benefit of the community.

    Thanks.

    Wednesday, October 23, 2019 12:44 PM
    Moderator
  • Your Reply above:

    When adding VM to LB you can either have them in Availability set OR in Availability zone. You can't use Availability set and Availability Zone together (Availability zone is not present in all regions).

    Possibilities of VM being added to LB: Individual VM (Single VM), Availability set and Virtual machine scale set(VM addition to LB is managed by platform internally). 

    Question:

    Are you saying an LB can have VM(s) added to it as a availability set or you can have VM(s) added in a availability zone?   Recall availability set is an object created in the ARM (ie nic, disks, vnet,... there is a avail set object that can be deleted) while availability zone does not create an object in the ARM (the is not AZ object).   

    XXXXXXXXXXXXXXX

    Are you also saying that a single VM can be in a scale set and it can scale out although it will take some time for the new VM to create?

    Can we add VMs to a LB (either basic or standard) into different AZ zones.  Recall the configuration during creation is to add to a specific AZ zone.   Can this AZ zone be changed after configuration?


    XXXXXXXXXXXXXXXXXX

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

    scale sets below in the table comparing avail sets vs scale sets:How can a scale set include multiple avail sets?  Once avail sets are created you cannot add new VMs to it?  

    Automatic distribution of VM instances across Availability Zones or Availability Sets


    dsk




    • Edited by kimdav111 Wednesday, October 23, 2019 4:43 PM
    Wednesday, October 23, 2019 4:04 PM
  • I think we should start over a bit with the basics. 

    First, I suggest reviewing the documents we have on Availability Sets and Availability Zones

    https://docs.microsoft.com/en-us/azure/virtual-machines/windows/manage-availability

    https://docs.microsoft.com/en-us/azure/availability-zones/az-overview

    To answer some basic questions, when creating virtual machines you have the option to add the VMs into an Availability set or an Availability Zone. Note that AV Zones are not live in all areas though and AV sets are. You cannot mix Availability Zones and Availability Sets. You pick one or the other. For Availability Sets, the VMs will be spread across multiple update and fault domains in the same data center. This means that they will be located on different physical racks. So if a rack goes down, it means only as single VM in that AV set will go down as the others are placed in different racks. 

    Availability zones work in the same way except we have up to 3 individual datacenters with their own dedicated resources all within on region. So instead of spreading out the VMs across multiple racks we spread them across multiple zones in that region. You are able to specify the number of zones you want to use during creation. 

    Azure Scalesets however cannot use Availability Sets. Rather we have a built in feature that you don't have to enable called placement groups. It works the same as an Availability Set however it is specific to VMSS as they consist of a large number of VMs. 

    Availability Zones are essentially the best option as it has all the features of an AV Set with the advantage of spreading across multiple physical data centers in a region. So even if an entire region went down, you would still have VMs in the other regions up and running. 

    For availability sets, you cannot add a VM to an AV set after it has been created. You can add a VM to an existing AV set during the creation of that new VM but not after. The same is for Availability Zones. So per your first question, the resources are usually created with the AV set first, then the VMs are created and placed into it. Same with the AV zones however we don't have to actually create the AV zone rather you specify if you want to use AV zones and which ones then during the creation of the VMs we take care of the placement throughout those dispersed data centers. 

    I just provided a lot of information, all of which is covered in the docs but possibly worded a bit differently. Can you review this info and let me know what else you want to better understand of specific questions you have? 

    Wednesday, October 23, 2019 8:42 PM
    Moderator
  • Great explanation.  I feel like you clarified aspect of scale sets, avail sets, and avail zones. 

    Just curious why would we use a Avail Zone versus a Scale Set?   I know you said that a VMSS is designed for a large number of VMs but could you not have a 2 VM scale set?  For a VMSS with two VMs which may grow to maybe three VMs,... would this be practical?  If a VMSS loses both VMs could it then scale out two replacement VMs,.. let's say in the case of a patch breaking the server?   

    Regarding public IP, can it be used for internal user traffic or do we choose internal IP?  Is public IP used for only Internet traffic (outside your organization)?  We had previously configured a internal IP for a basic LB for a SQL AG.


    dsk

    Thursday, October 24, 2019 2:13 PM
  • The question of Availability Zone VS Scale Set doesn't really make sense. If you use a scale set then you would want to use an availability zone in addition. It is the Availability Set that is not available with VMSS as scale sets use placement groups in place of availability sets by default. 

    And yes, you can have a small scale set as well. Scale sets are great for handling work loads that can spread across multiple VMs as well as they are fantastic as scaling up and down to handle the load. 

    If a scale set instance goes down the platform will remove it and provision a new one. This will also remove that instance from the load balancer and replace it with a new instance once it is up and running. 

    Per public IP, you can use it for internal or external traffic. It is really up to you. That being said, if you have no reason to use a public IP I would advise only using a private IP as it will further secure your environment. So it just comes down to what you need. If you are hosting a website on scale sets you would want to have a public IP. But if you are using it to handle SQL tables for internal company work, no need for a public IP as there is no need for anyone in the public to access it. 

    Thursday, October 24, 2019 4:41 PM
    Moderator
  • Hello,

    Any update on the issue?

    Just checking in if you got a chance to see previous reply from Micah.

    If the suggested response helped you resolve your issue, do click on "Mark as Answer" and "Up-Vote" for the answer that helped you for benefit of the community.

    Thanks.

    Tuesday, October 29, 2019 2:46 PM
    Moderator