What Is ASG in Networking?
On This Page
Quick Definition
An Availability Set (often abbreviated as ASG in some contexts, though officially AvSet) is a feature in Microsoft Azure that keeps your virtual machines running even if hardware fails or maintenance is needed. It works by spreading your VMs across separate physical servers, racks, and power sources inside an Azure datacenter. This way, if one part of the hardware goes down, all your VMs are not affected at the same time.
Commonly Confused With
An Availability Zone is a physically separate datacenter within an Azure region, with its own power, cooling, and networking. An Availability Set operates within a single datacenter, spreading VMs across different racks. Availability Zones protect against datacenter failure, while Availability Sets protect against rack-level failure.
Use Availability Zones for mission-critical applications that need to survive a datacenter outage. Use Availability Sets for simpler, cost-effective rack-level redundancy.
A Virtual Machine Scale Set (VMSS) automatically creates and manages a group of identical VMs with auto-scaling capabilities. It also includes built-in high availability through fault domains and update domains, similar to an Availability Set. However, VMSS is designed for scaling out based on demand, while an Availability Set is for manually managed fixed VM counts.
Use VMSS when you need to add or remove VMs automatically based on CPU usage. Use an Availability Set when you have a fixed number of VMs that you manage individually.
A Load Balancer distributes incoming network traffic across multiple VMs to ensure no single VM is overwhelmed. It also performs health checks and redirects traffic away from failed VMs. An Availability Set does not handle traffic distribution; it only ensures VMs are on separate physical hardware.
Use a Load Balancer in front of your web servers to spread user requests. Use an Availability Set behind the load balancer to keep the VMs themselves safe from hardware failures.
A Resource Group is a logical container that holds related Azure resources. It has nothing to do with availability or hardware placement. An Availability Set is a resource that can be placed inside a resource group, but they serve completely different purposes.
Think of a Resource Group as a folder for your Azure items. The Availability Set is one of the items in that folder that affects how your VMs are physically arranged.
Must Know for Exams
The AZ-104 Microsoft Azure Administrator exam includes a significant focus on high availability and disaster recovery. The term Availability Set appears directly in the exam skills measured under the section 'Manage identity and governance' and 'Deploy and manage Azure compute resources.' You will likely see multiple-choice questions that ask you to select the best high-availability option for a given scenario.
Common exam objectives related to Availability Sets include: understanding the difference between fault domains and update domains, knowing the maximum number of fault domains (3) and update domains (20), and recognizing when to use an Availability Set versus an Availability Zone. You may be given a scenario where a company runs three VMs for a web application and needs to protect against a rack-level failure. The correct answer would be to place them in an Availability Set.
Another typical question pattern involves planned maintenance. The exam might describe an Azure maintenance event and ask which VMs remain unaffected. Because update domains ensure that only VMs in one domain are rebooted at a time, the correct answer would point to VMs in different update domains being unaffected during that maintenance window.
You may also see questions that test your understanding of limitations. For instance, a VM cannot be added to an Availability Set after it is created; it must be created within the set. Availability Sets do not provide protection against region-level disasters. The exam might present a scenario that includes both regional and datacenter-level failures to see if you choose an Availability Set (datacenter only) or Availability Zones (across datacenters in a region).
Finally, be prepared for questions about cost. Availability Sets themselves are free, but they require at least two VMs to be useful. The exam may ask you to recommend a cost-effective high-availability solution for a development environment. The Availability Set is often the right answer because it is simpler and cheaper than Availability Zones, which require premium storage and have higher network latency considerations.
Simple Meaning
Imagine you are moving into a new apartment building with your friends. You all want to live close together, but you also want to be safe in case something goes wrong. If you all lived in the same room and the lights went out, all of you would be in the dark. But if you spread out across different floors and different parts of the building, even if one floor loses power, the others stay bright.
An Availability Set works exactly like that, but for virtual machines in the Azure cloud. When you create several virtual machines, which are like imaginary computers running inside Microsoft's datacenters, you can group them into an Availability Set. This set ensures that your VMs are placed on different physical servers, different racks of servers, and different power and cooling zones inside the datacenter.
Why does this matter? Because datacenters are huge buildings with thousands of servers. Sometimes a server breaks, or a network switch fails, or a power supply goes out. If all your VMs were on the same server, a single problem would knock them all offline. By placing VMs in an Availability Set, Azure guarantees that no single hardware failure can take down all your VMs at once. This is a basic but powerful way to make your applications more reliable without needing to build your own backup systems. For IT beginners, think of it as the cloud version of not putting all your eggs in one basket.
Full Technical Definition
An Availability Set is an Azure resource that provides redundancy and high availability for virtual machines by distributing them across multiple fault domains and update domains within a single Azure datacenter region. When you create an Availability Set and then add VMs to it, Azure automatically assigns each VM to a specific fault domain and update domain to ensure that hardware failures and planned maintenance events do not affect all VMs simultaneously.
Fault domains represent a group of servers that share a common power source and network switch. In a standard Availability Set, Azure creates up to three fault domains. Each VM you add is placed into one of these fault domains, so that if a power failure or network issue affects one fault domain, VMs in the other fault domains remain operational. This is critical for maintaining service availability during unplanned outages.
Update domains are groups of servers that are updated during planned maintenance. Azure defines up to 20 update domains in a single Availability Set, though the default is five. When Microsoft performs maintenance to patch or upgrade the physical servers, it reboots servers in one update domain at a time, waiting for the previous domain to complete before moving on. This means that VMs in an Availability Set are never all rebooted at the same time during maintenance.
Technically, the Availability Set does not cost anything itself; you only pay for the VMs inside it. However, you must create the Availability Set before you create the VMs, and you must place the VMs in the same region and resource group. The VMs within an Availability Set should be identical in configuration to support the application load. For the AZ-104 exam, it is important to remember that an Availability Set provides resilience only within a single datacenter, not across regions. For region-level disaster recovery, you would need Azure Site Recovery or paired regions.
Windows and Linux VMs can both be placed in an Availability Set. There is no difference in behavior. Networking and storage constraints apply normally, but you should be aware that using managed disks is strongly recommended with Availability Sets, as unmanaged disks can introduce single points of failure. The Availability Set concept is one of the foundational high-availability patterns in Azure, along with Availability Zones and Virtual Machine Scale Sets.
Real-Life Example
Think about a popular food truck festival. You and your team run three food trucks that serve the same menu. You want to be sure that customers can always get food, even if something goes wrong with one truck. If you park all three trucks right next to each other on the same block, a single traffic accident or a burst water pipe on that block could stop all three trucks from serving customers. That would be a disaster for your business.
So instead, you decide to park your trucks in three different spots around the festival grounds. Truck 1 goes near the main stage, Truck 2 near the entrance, and Truck 3 near the restrooms. Each truck uses a different power outlet, and they are on different food service zones. If a power outage happens near the main stage, only Truck 1 is affected. Trucks 2 and 3 keep serving customers. If the health inspector closes the area by the restrooms for cleaning, only Truck 3 is affected. You still have food available elsewhere.
In this analogy, each food truck is a virtual machine in your Azure environment. The different parking spots are the fault domains within an Availability Set. The Availability Set is the overall plan that ensures your trucks are spread across the festival grounds. The festival grounds represent a single Azure datacenter. If you wanted protection across multiple datacenters, you would need additional tools, just like if you wanted to serve customers in different cities with your trucks.
This simple arrangement of spreading resources is exactly what an Availability Set does for your cloud applications. It is a low-cost, effective way to keep your services running when things go wrong at the hardware level.
Why This Term Matters
In real-world IT, downtime costs money and damages reputation. Even a few minutes of unavailability can lead to lost sales, unhappy users, or compliance violations. Many IT professionals are responsible for keeping applications running 24/7. An Availability Set is one of the easiest and cheapest ways to protect against hardware failures in Azure.
Without an Availability Set, if you run multiple VMs for a single application, Azure could place them all on the same physical server. If that server fails or needs maintenance, all your VMs go down at once. This is a single point of failure that is completely avoidable. By using an Availability Set, you ensure that your VMs are spread across different hardware, so no single failure takes out your entire application.
Availability Sets are especially important for applications that are not designed to handle sudden failures on their own. For example, a legacy application that runs on two VMs with a shared database can benefit greatly. Even if the application itself is not built for horizontal scaling, using an Availability Set protects it from hardware-related downtime.
For IT professionals studying for the AZ-104 exam, understanding Availability Sets is essential because the exam tests your ability to design and implement high-availability solutions. You will be asked to choose between Availability Sets, Availability Zones, and Virtual Machine Scale Sets based on cost, complexity, and redundancy requirements. Grasping the basic concept of fault and update domains is a must for these questions.
How It Appears in Exam Questions
You will encounter scenario-based questions where a company needs to ensure that their virtual machines remain available during both planned maintenance and unplanned hardware failures. For example: A company runs a pair of domain controllers in Azure. They want to protect against a single server failure and also against maintenance reboots. What should they use? The answer is an Availability Set with at least two VMs placed in it.
Another question type tests your knowledge of fault domains. The question might say: Your application runs on three Azure VMs in an Availability Set. A fire in one server rack destroys all servers in that rack. How many VMs will be affected? The correct answer is one, because each VM is in a different fault domain.
Configuration questions also appear. You might be asked to order the steps to create an Availability Set. The steps include: create the Availability Set in the desired region, specify the number of fault and update domains, and then create VMs inside that set during the VM creation wizard. Some questions will present the steps out of order and ask you to arrange them correctly.
Troubleshooting questions may involve a situation where VMs are not behaving as expected. For instance, an admin creates an Availability Set but then notices all VMs are in the same fault domain. This can happen if the VMs were created before the Availability Set or if the set was created with only one fault domain. The question would ask you to identify the issue and the correct resolution.
Finally, you might see comparison questions that list multiple high-availability features and ask which one offers protection within a single datacenter. The answer is Availability Set. Other options might include Load Balancer, Traffic Manager, or Azure Site Recovery, which serve different purposes.
Practise ASG Questions
Test your understanding with exam-style practice questions.
Example Scenario
A company named TechWidgets runs a small e-commerce website on two Azure virtual machines. Both VMs run the same web server software and are configured identically. The database is hosted separately on Azure SQL. The company wants to ensure that if one VM goes down because of a hardware issue, the other VM can still serve customers.
To achieve this, the IT administrator decides to use an Availability Set. They first create an Availability Set called 'WebServerAvSet' in the East US region. During the creation, they accept the default settings of two fault domains and five update domains. Then they create the first virtual machine and select 'WebServerAvSet' as its Availability Set. After the first VM is created, they create a second VM and also select the same Availability Set.
Because both VMs are in the same Availability Set, Azure places them into different fault domains. This means they are on different physical racks with separate power and network. If a power supply fails in one rack, only one VM is affected. The other VM continues running. During Azure's monthly maintenance, only one VM is rebooted at a time because they are in different update domains. The other VM remains available.
To complete the solution, the admin places an Azure Load Balancer in front of both VMs. The load balancer distributes incoming traffic to both VMs. If one VM fails, the load balancer automatically sends all traffic to the healthy VM. This ensures that customers experience no downtime even when one VM is offline.
This simple scenario shows how an Availability Set, combined with a load balancer, provides a cost-effective high-availability solution for a two-tier web application. The company does not need complex configurations or multiple regions for this basic level of protection.
Common Mistakes
Thinking an Availability Set protects across Azure regions.
An Availability Set only provides redundancy within a single datacenter inside one region. It does not protect against regional outages.
Use Azure Site Recovery or paired regions for cross-region disaster recovery, and use Availability Sets for datacenter-level protection.
Adding a VM to an Availability Set after the VM has already been created.
You cannot associate an existing VM with an Availability Set. The VM must be created inside the set from the start.
Plan ahead and create the Availability Set before creating the VMs. If you already have VMs, you must recreate them and select the Availability Set during creation.
Assuming all VMs in an Availability Set automatically stay in separate fault domains.
If you create the Availability Set with only one fault domain, all VMs will be in the same fault domain, negating the benefit. The default is usually two or three, but you must verify.
When creating an Availability Set, set the number of fault domains to at least 2, and preferably 3, to ensure distribution.
Believing an Availability Set provides load balancing.
An Availability Set only handles placement and redundancy. It does not distribute traffic between VMs.
Add an Azure Load Balancer or Application Gateway in front of your VMs to distribute incoming traffic and automatically route around failed VMs.
Thinking you can place VMs from different regions into the same Availability Set.
An Availability Set is bound to a single region. All VMs in an Availability Set must be in the same region.
Create separate Availability Sets in each region where you deploy VMs, or consider Availability Zones for within-region multi-datacenter redundancy.
Exam Trap — Don't Get Fooled
{"trap":"The exam might describe a scenario where the company needs protection against a datacenter-wide failure and asks whether an Availability Set is sufficient.","why_learners_choose_it":"Learners see 'high availability' and think an Availability Set covers all failures, including the entire datacenter going down.","how_to_avoid_it":"Remember that an Availability Set only works within a single datacenter.
If the question mentions 'datacenter failure' or 'region outage,' the correct answer is Availability Zones or paired regions, not an Availability Set."
Step-by-Step Breakdown
Plan your high-availability requirements
Decide how many VMs you need and whether you need protection against rack-level failures (Availability Set) or datacenter-level failures (Availability Zones). For most basic applications, an Availability Set is sufficient.
Create the Availability Set
In the Azure portal, search for 'Availability Set' and click Create. Choose a name, select the region, and set the number of fault domains (usually 2 or 3) and update domains (default 5). This resource does not cost anything to create.
Create your first virtual machine
During the VM creation process, on the 'Basics' tab, under 'Availability options,' select 'Availability Set' and then choose the Availability Set you just created. This ensures the VM will be placed into a specific fault domain and update domain within that set.
Create additional virtual machines
Create each additional VM and select the same Availability Set. Azure automatically places each new VM into a different fault domain and update domain to maximize redundancy. Continue until you have the desired number of VMs.
Configure networking and load balancing
Place a Load Balancer or Application Gateway in front of your VMs to distribute traffic. The load balancer will send requests to all healthy VMs. If one VM fails due to hardware issues, the load balancer automatically reroutes traffic to the remaining VMs.
Test and verify placement
Use Azure Monitor or the Azure portal to view the fault domain and update domain assignments for each VM. You should see different domain numbers for each VM, confirming that Azure has distributed them across different physical hardware.
Practical Mini-Lesson
In day-to-day IT work, understanding Availability Sets helps you design resilient systems without overspending on complex solutions. When you deploy applications in Azure, you always need to consider what happens when a physical server fails. An Availability Set is your first line of defense against such failures.
To implement an Availability Set correctly, you must create it first. Many beginners create VMs and then try to add them to an Availability Set later, which is not possible. You also need to decide on the number of fault domains. In most cases, the maximum of three is best because it gives you the most hardware diversity. However, if you only have two VMs, two fault domains are fine.
Professionals should also know that Availability Sets work best with managed disks. Managed disks ensure that the VHD files for your VMs are stored in different storage clusters, further reducing single points of failure. If you use unmanaged disks, you risk having all your VMs depend on the same storage account, which could fail.
What can go wrong? If you set only one fault domain, all VMs end up on the same physical rack. This is a common configuration mistake. Also, if you have more VMs than fault domains, multiple VMs will share the same fault domain, but that is acceptable as long as you still have distribution across update domains. Another issue is forgetting to add a load balancer. Without it, users cannot automatically reach a backup VM when the primary one fails.
In practice, Availability Sets are commonly used for domain controllers, file servers, and legacy applications that cannot or should not be scaled out automatically. They are also a prerequisite for certain SLA agreements from Microsoft. If you have at least two VMs in an Availability Set with all traffic served through a load balancer, you can achieve a 99.95% uptime SLA for the VMs.
For the AZ-104 exam, expect to see questions about configuring Availability Sets, choosing between options, and understanding fault and update domains. The key takeaway is that Availability Sets are simple, free, and effective for rack-level redundancy, but they are not a substitute for cross-region disaster recovery.
Memory Tip
Think 'AFU', Availability Set protects against hardware failures by distributing VMs across different Fault domains and Update domains within one datacenter.
Covered in These Exams
Current Exam Context
Current exam versions that test this topic — use these objectives when studying.
AZ-104AZ-104 →200-301Cisco CCNA →N10-009CompTIA Network+ →220-1101CompTIA A+ Core 1 →PCAGoogle PCA →Related Glossary Terms
Frequently Asked Questions
Can I add an existing VM to an Availability Set?
No. An existing VM cannot be added to an Availability Set after it is created. You must create the VM inside the Availability Set from the beginning.
Does an Availability Set cost anything?
No, the Availability Set resource itself is free. You only pay for the virtual machines and other resources (like storage) that you run inside it.
How many fault domains can an Availability Set have?
The maximum number of fault domains in an Availability Set is 3. The default is 2 in most regions, but you can configure it up to 3.
What is the difference between fault domains and update domains?
Fault domains protect against hardware failures by spreading VMs across different racks with separate power and network. Update domains protect against planned maintenance by ensuring only a subset of VMs are rebooted at a time.
Can I use Availability Sets with Availability Zones together?
No, you cannot use both on the same VM. A VM can be part of either an Availability Set or an Availability Zone, but not both. They are different redundancy mechanisms.
Do I need a load balancer if I use an Availability Set?
An Availability Set does not provide traffic distribution. You still need a load balancer to route traffic to healthy VMs. Without it, users would need to know the IP of each VM individually.
Is an Availability Set enough for disaster recovery?
No. An Availability Set only protects within a single datacenter. For disaster recovery across regions, you need Azure Site Recovery or paired regions.
Summary
An Availability Set is a fundamental Azure feature that helps keep your virtual machines running when hardware fails or during planned maintenance. It works by placing your VMs on different physical servers, racks, and power domains inside a single Azure datacenter. This distribution across fault domains and update domains ensures that no single hardware failure or maintenance event can take all your VMs offline at once.
For IT certification learners targeting the AZ-104 exam, understanding Availability Sets is essential. The exam tests your ability to choose between high-availability options, configure fault and update domains, and recognize limitations. Availability Sets are simple, free, and effective for basic redundancy, but they do not protect against datacenter-wide failures. For that, you would need Availability Zones or cross-region disaster recovery.
The key exam takeaway is that an Availability Set provides rack-level resilience within a single datacenter. It is best used with at least two VMs, managed disks, and a load balancer to achieve a 99.95% uptime SLA. Avoid common mistakes like trying to add existing VMs, using only one fault domain, or confusing Availability Sets with other services like load balancers or scale sets. Master this concept, and you will be well prepared for high-availability questions on the exam.