Courseiva
Deploy and Manage Azure ComputeeasyMultiple ChoiceObjective-mapped

Auto-Scale VMs Based on CPU Usage with Schedule

A stateless web application must automatically add VM instances during business hours and remove them at night based on CPU usage. Which Azure service should be deployed?

Quick Answer

The answer is Virtual Machine Scale Sets (VMSS). This is the correct choice because VMSS natively integrates with Azure Autoscale to dynamically adjust the number of VM instances based on CPU utilization thresholds, while also supporting scheduled scaling rules that align with business hours—allowing you to add instances during peak daytime demand and remove them at night. On the AZ-104 exam, this scenario tests your understanding of how VMSS differs from standalone VMs or availability sets, which lack native autoscaling and schedule-based logic. A common trap is confusing VMSS with Azure Load Balancer or App Service scaling, but remember that VMSS is specifically designed for stateless, horizontally scalable workloads that require both metric-driven and time-based scaling. Memory tip: think “VMSS = Metric + Schedule” to recall that it handles both CPU-triggered and calendar-triggered scaling in one service.

⚠ Common exam trap

Candidates often confuse an availability set (which provides high availability) with a scale set (which provides auto-scaling), leading them to select availability set when the question explicitly requires automatic scaling based on CPU and time schedules.

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

Virtual Machine Scale Sets (VMSS) are designed to automatically scale the number of VM instances in or out based on metrics like CPU usage, and they support scheduled scaling to align with business hours. This makes them the correct choice for a stateless web application that needs to add instances during business hours and remove them at night, as VMSS can integrate with Azure Autoscale to adjust capacity based on both performance metrics and time schedules.

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

    Why this is correct

    A virtual machine scale set is designed for identical VM instances that can scale out and scale in based on demand. It works well for stateless applications because instances can be added or removed without needing manual reconfiguration of each server. Autoscale rules can use metrics such as CPU percentage to change capacity automatically.

  • Availability set

    Why it's wrong here

    An availability set only distributes VM instances across fault and update domains to protect against hardware failures and planned maintenance within a single region; it provides no mechanism for scaling instances in or out based on CPU usage or a time schedule. This option is tempting because availability sets are a common choice for ensuring high availability of a multi-VM application, and they would be correct if the requirement were solely to guarantee uptime during planned Azure updates, not to automate dynamic scaling.

    When this WOULD be correct

    When the question asks for a solution to ensure high availability for a set of VMs by distributing them across multiple fault domains and update domains within a single region, an availability set is the correct answer.

  • Azure Bastion

    Why it's wrong here

    Azure Bastion provides secure remote access to VMs, but it does not manage application scaling or instance count.

    When this WOULD be correct

    An exam question asks: 'You need to provide secure, seamless RDP/SSH connectivity to Azure VMs without exposing public IP addresses. Which service should you use?'

  • Proximity placement group

    Why it's wrong here

    A proximity placement group helps place resources close together for latency reasons, not for autoscaling behavior.

    When this WOULD be correct

    An application requires VMs to be physically close to each other to minimize network latency, such as for a high-performance computing (HPC) workload or a tightly coupled application where inter-VM communication latency is critical.

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 setCorrect answer

Why this is correct

A virtual machine scale set is designed for identical VM instances that can scale out and scale in based on demand. It works well for stateless applications because instances can be added or removed without needing manual reconfiguration of each server. Autoscale rules can use metrics such as CPU percentage to change capacity automatically.

Availability setWrong answer — click to see why

Why this is wrong here

An availability set is a logical grouping of VMs to protect against failures within a datacenter, but it does not provide automatic scaling based on CPU usage or schedule.

★ When this WOULD be the correct answer

When the question asks for a solution to ensure high availability for a set of VMs by distributing them across multiple fault domains and update domains within a single region, an availability set is the correct answer.

Why candidates choose this

Candidates may confuse availability sets with scale sets because both involve multiple VMs, but availability sets focus on redundancy, not auto-scaling.

Azure BastionWrong answer — click to see why

Why this is wrong here

Azure Bastion provides secure RDP/SSH access to VMs without public IPs, but it does not handle auto-scaling or scheduling of VM instances based on CPU usage or time.

★ When this WOULD be the correct answer

An exam question asks: 'You need to provide secure, seamless RDP/SSH connectivity to Azure VMs without exposing public IP addresses. Which service should you use?'

Why candidates choose this

Candidates may confuse Bastion with a scaling solution because it is a managed service that simplifies VM management, but its purpose is access security, not auto-scaling.

Proximity placement groupWrong answer — click to see why

Why this is wrong here

Proximity placement groups reduce network latency between VMs but do not provide autoscaling or scheduled instance management based on CPU usage, which is required for the stateless web application.

★ When this WOULD be the correct answer

An application requires VMs to be physically close to each other to minimize network latency, such as for a high-performance computing (HPC) workload or a tightly coupled application where inter-VM communication latency is critical.

Why candidates choose this

Candidates may confuse proximity placement groups with scaling solutions, thinking that grouping VMs closely can help manage load, but they do not offer any automatic scaling or scheduling capabilities.

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?”

About these practice questions

One of 1,049 original AZ-104 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways 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. You need to deploy 30 identical Azure virtual machines for a web application and scale the instance count automatically based on CPU demand. Which Azure compute feature should you use?

medium
  • A.An availability set
  • B.A Virtual Machine Scale Set
  • C.A Recovery Services vault
  • D.Boot diagnostics

Why B: Virtual Machine Scale Sets (VMSS) are designed specifically to deploy and manage a group of identical, load-balanced VMs that can automatically scale in or out based on CPU demand or other metrics. This matches the requirement for 30 identical VMs and autoscaling, making B the correct choice.

Variation 2. You need to deploy 25 identical Azure virtual machines for a web application and scale the number of instances automatically based on CPU demand. Which Azure compute feature should you use?

medium
  • A.An availability set
  • B.A Virtual Machine Scale Set
  • C.A Recovery Services vault
  • D.Boot diagnostics

Why B: A Virtual Machine Scale Set (VMSS) is the correct Azure compute feature because it allows you to deploy and manage a group of identical, load-balanced VMs whose number can automatically increase or decrease in response to CPU demand using autoscale rules. This directly meets the requirement for 25 identical VMs with automatic scaling based on CPU metrics.

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.