A stateless web service must handle traffic spikes by adding or removing instances automatically based on CPU usage. Which Azure service fits best?
Virtual Machine Scale Set with autoscale is the only option that directly satisfies the requirement of a stateless web service handling traffic spikes. It maintains a pool of identical VM instances behind a load balancer and uses autoscale rules based on metrics such as average CPU percent, memory pressure, or incoming request rate to automatically add instances during a spike and remove them when demand drops. Because the workload is stateless, instances can be created or destroyed without risk of losing session state. You can also define minimum and maximum instance limits and set cool-down periods to prevent autoscale thrashing.
Why this answer
A Virtual Machine Scale Set (VMSS) with autoscale is the correct choice because it automatically adjusts the number of VM instances based on CPU utilization metrics, enabling the stateless web service to handle traffic spikes by scaling out (adding instances) and scaling in (removing instances) as needed. This aligns with the requirement for a stateless, elastic, and automated scaling solution.
Exam trap
The trap here is that candidates often confuse high availability (provided by availability sets) with autoscaling, or assume a single large VM can handle spikes via vertical scaling, ignoring the need for horizontal, automated scaling for stateless workloads.
Why the other options are wrong
A single large VM cannot automatically scale out or in based on demand; it only supports vertical scaling (resizing), not horizontal scaling required for handling traffic spikes.
An availability set only provides high availability for two VMs but does not automatically scale instances based on CPU usage; it lacks autoscaling capabilities required for handling traffic spikes.
Recovery Services vault backup is a disaster recovery and backup service, not designed for handling traffic spikes or automatic scaling of compute instances. It does not add or remove VMs based on CPU usage.
When would these options actually be correct?
For a legacy application that cannot be distributed across multiple instances and requires maximum compute power on a single machine, such as a monolithic database server with strict licensing constraints.
For a stateless web service that needs high availability within a single region (e.g., 99.95% SLA) but does not require automatic scaling, an availability set with two VMs would be correct.
A question asks: 'Which Azure service provides automated backup and disaster recovery for Azure VMs, ensuring data protection and restore capabilities?' In that context, Recovery Services vault backup would be the correct answer.
Why candidates pick the wrong answer
Candidates may think a larger VM provides enough headroom for spikes, overlooking the need for automatic horizontal scaling to handle unpredictable load changes.
Candidates may confuse high availability (provided by availability sets) with scalability, assuming two VMs can handle spikes, but they miss the requirement for automatic addition/removal of instances.
Candidates may confuse backup/DR services with scaling solutions, or mistakenly think that 'Recovery Services' implies recovery from traffic spikes, not understanding its actual purpose.