Autoscale Stateless Web App with Virtual Machine Scale Set
A stateless web app on Azure must add or remove instances automatically when CPU usage changes. Which service should you deploy?
Quick Answer
The answer is a virtual machine scale set with autoscale, because it is the only Azure service designed to automatically adjust the number of identical VM instances in response to changing CPU usage, which is exactly what a stateless web app requires. A VMSS treats each instance as disposable and interchangeable, so autoscale rules can safely add or remove instances when CPU crosses a defined threshold—such as scaling out at 75% CPU and scaling in when it drops below—without worrying about session state or data persistence. On the AZ-104 exam, this question tests your understanding of compute scaling options; a common trap is choosing Azure App Service autoscale, which works for PaaS but not for managing individual VMs, or selecting a load balancer alone, which distributes traffic but does not add or remove instances. Remember the key distinction: stateless plus CPU-driven scaling equals VMSS with autoscale. A helpful memory tip is “stateless scale set”—if the app doesn’t care which VM it runs on, a scale set is the right fit.
⚠ Common exam trap
A common mix-up: candidates confuse high-availability constructs (availability sets) or storage components (managed disks) with autoscaling compute, or assume a single VM can be dynamically scaled horizontally, when only VMSS provides automated instance-level scaling based on metrics.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Virtual machine scale set with autoscale
A virtual machine scale set (VMSS) with autoscale is the correct choice because it is designed to automatically increase or decrease the number of VM instances based on metrics like CPU usage. Autoscale rules can be configured to scale out when CPU exceeds a threshold (e.g., 75%) and scale in when it drops below a threshold, ensuring the stateless web app handles variable load without manual intervention.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Virtual machine scale set with autoscale
Why this is correct
VM scale sets are designed for multiple identical instances and can scale automatically based on rules.
- ✗
Single virtual machine
Why it's wrong here
A single VM cannot add or remove instances automatically for elastic demand-based scaling.
When this WOULD be correct
A single virtual machine would be correct for a stateless web app that does not require high availability or scaling, such as a development/test environment or a low-traffic application where manual scaling is acceptable.
- ✗
Availability set
Why it's wrong here
An availability set improves availability, but it does not automatically scale instance count.
When this WOULD be correct
An availability set would be correct if the question asked for a solution to ensure high availability for a stateless web app by distributing VMs across fault domains and update domains, without requiring automatic scaling.
- ✗
Managed disk
Why it's wrong here
A managed disk is a storage resource, not a compute service that scales application instances.
When this WOULD be correct
When the question asks for a durable, high-performance storage option for Azure VMs, such as 'Which storage option provides persistent block storage with encryption at rest for a production database VM?'
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-104 exam frequently reuses these exact scenarios with slightly different constraints.
✓Virtual machine scale set with autoscaleCorrect answer▾
Why this is correct
VM scale sets are designed for multiple identical instances and can scale automatically based on rules.
✗Single virtual machineWrong answer — click to see why▾
Why this is wrong here
A single virtual machine cannot automatically scale out or in based on CPU usage; it lacks the orchestration and autoscaling capabilities needed for a stateless web app that requires dynamic instance adjustment.
★ When this WOULD be the correct answer
A single virtual machine would be correct for a stateless web app that does not require high availability or scaling, such as a development/test environment or a low-traffic application where manual scaling is acceptable.
Why candidates choose this
Candidates may think a single VM can handle autoscaling by itself, not realizing that autoscaling requires a scale set to manage multiple instances.
✗Availability setWrong answer — click to see why▾
Why this is wrong here
An availability set provides high availability for VMs within a datacenter but does not include autoscaling capabilities to automatically add or remove instances based on CPU usage.
★ When this WOULD be the correct answer
An availability set would be correct if the question asked for a solution to ensure high availability for a stateless web app by distributing VMs across fault domains and update domains, without requiring automatic scaling.
Why candidates choose this
Candidates may confuse availability sets with scalability features, thinking that distributing VMs across fault domains also enables automatic scaling, or they may not fully understand the distinct purposes of availability sets versus scale sets.
✗Managed diskWrong answer — click to see why▾
Why this is wrong here
Managed disks are storage volumes for VMs, not a compute scaling solution. They do not provide automatic instance addition or removal based on CPU usage.
★ When this WOULD be the correct answer
When the question asks for a durable, high-performance storage option for Azure VMs, such as 'Which storage option provides persistent block storage with encryption at rest for a production database VM?'
Why candidates choose this
Candidates may confuse managed disks with the ability to manage scaling, or think that 'managed' implies automatic scaling, but it only refers to storage management.
Analysis generated from the official AZ-104blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Go deeper
Related to this question
About these practice questions
This AZ-104 question is part of Courseiva's 1,049-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on AZ-104
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A stateless API must automatically add or remove identical VM instances when CPU usage crosses thresholds. The team also wants Microsoft to distribute instances across fault domains when possible. Which service should the administrator deploy?
medium- A.An availability set
- B.Azure Load Balancer
- ✓ C.A virtual machine scale set
- D.Azure App Service
Why C: A virtual machine scale set (VMSS) is the correct choice because it provides built-in autoscaling capabilities that automatically add or remove identical VM instances based on CPU usage thresholds. VMSS also supports automatic distribution of instances across fault domains when configured with a fault domain count greater than 1, meeting the requirement for Microsoft to distribute instances across fault domains.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-104 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-104 exam.