Courseiva
Deploy and Manage Azure ComputeeasyMultiple ChoiceObjective-mapped

AZ-104 Deploy and Manage Azure Compute Practice Question

A stateless web application needs a group of identical Azure VMs that can automatically add more instances during the workday and remove them at night based on CPU usage. What should the administrator deploy?

⚠ Common exam trap

Watch out — candidates often confuse availability sets (which provide fault tolerance but no scaling) with virtual machine scale sets (which provide both scaling and high availability), or they mistakenly think Azure Policy can dynamically adjust compute resources, when it only enforces configuration rules.

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

A virtual machine scale set with autoscale rules

A virtual machine scale set (VMSS) with autoscale rules is the correct solution because it provides a group of identical, load-balanced VMs that can automatically scale out (add instances) during high CPU usage in the workday and scale in (remove instances) at night based on CPU thresholds. This matches the stateless, elastic requirement perfectly, as VMSS is designed for horizontal scaling of identical instances with autoscale policies tied to metrics like CPU percentage.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • An availability set with two VMs

    Why it's wrong here

    An availability set with two VMs only protects against hardware failures and planned maintenance by distributing VMs across fault and update domains, but it does not automatically change the number of running VMs. It provides high availability with a fixed, manually managed capacity, so it cannot handle sudden increases in web traffic. Additionally, there is no built-in mechanism to grow or shrink the VM count, making it unsuitable for elastic scaling.

    When this WOULD be correct

    When the requirement is to ensure high availability for a set of VMs (e.g., at least two VMs in different fault/update domains) without any need for automatic scaling.

  • A virtual machine scale set with autoscale rules

    Why this is correct

    A virtual machine scale set with autoscale rules is the correct choice because it is designed specifically to run a group of identical VMs that can dynamically scale out and in based on demand. Autoscale rules can monitor metrics such as CPU percentage, memory, or HTTP queue depth, and automatically add or remove VM instances without manual intervention. The stateless nature of the web app means each instance is interchangeable, which perfectly matches the VMSS model where all VMs use the same configuration template.

  • A single VM with a larger disk

    Why it's wrong here

    A single VM with a larger disk does not provide horizontal scaling, and increasing disk size only affects storage capacity, not compute throughput or the ability to handle more concurrent requests. Even if you resized the VM to a larger SKU, this would be vertical scaling, which still leaves a single point of failure and cannot elastically adapt to traffic fluctuations. The stateless web app requires multiple identical VMs that can be added or removed, not more storage space.

    When this WOULD be correct

    This option would be correct in a scenario where the requirement is to improve performance of a single VM by increasing its storage capacity or I/O throughput, such as for a database server that needs more disk space but does not require horizontal scaling.

  • An Azure Policy assignment to increase CPU capacity

    Why it's wrong here

    An Azure Policy assignment cannot increase CPU capacity because Azure Policy is a governance and compliance service that enforces rules on resources, such as tagging or location restrictions. It does not perform real-time scaling actions, alter VM sizes, or change processor allocation. Policies can evaluate and remediate resources, but they are not an autoscaling solution and cannot respond to changing workload demands.

    When this WOULD be correct

    An Azure Policy assignment would be correct if the question asked: 'An administrator needs to ensure that all VMs in a subscription are deployed with a specific SKU or have mandatory tags. What should they use?'

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.

A virtual machine scale set with autoscale rulesCorrect answer

Why this is correct

A virtual machine scale set with autoscale rules is the correct choice because it is designed specifically to run a group of identical VMs that can dynamically scale out and in based on demand. Autoscale rules can monitor metrics such as CPU percentage, memory, or HTTP queue depth, and automatically add or remove VM instances without manual intervention. The stateless nature of the web app means each instance is interchangeable, which perfectly matches the VMSS model where all VMs use the same configuration template.

An availability set with two VMsWrong answer — click to see why

Why this is wrong here

An availability set provides high availability for a fixed number of VMs but does not support automatic scaling based on CPU usage or schedule.

★ When this WOULD be the correct answer

When the requirement is to ensure high availability for a set of VMs (e.g., at least two VMs in different fault/update domains) without any need for automatic scaling.

Why candidates choose this

Candidates may confuse availability sets with scaling solutions, thinking that adding more VMs to an availability set can handle increased load, but it lacks autoscaling capability.

A single VM with a larger diskWrong answer — click to see why

Why this is wrong here

A single VM with a larger disk cannot automatically scale out or in based on CPU usage; it lacks the ability to add or remove instances dynamically, which is required for handling variable workload during the day and night.

★ When this WOULD be the correct answer

This option would be correct in a scenario where the requirement is to improve performance of a single VM by increasing its storage capacity or I/O throughput, such as for a database server that needs more disk space but does not require horizontal scaling.

Why candidates choose this

Candidates might think that increasing disk size or performance can handle higher CPU loads, confusing vertical scaling (upgrading a single VM) with horizontal scaling (adding more VMs).

An Azure Policy assignment to increase CPU capacityWrong answer — click to see why

Why this is wrong here

Azure Policy is used to enforce compliance rules (e.g., tagging, allowed locations) and cannot dynamically add or remove VM instances based on CPU usage. It does not provide autoscaling capabilities.

★ When this WOULD be the correct answer

An Azure Policy assignment would be correct if the question asked: 'An administrator needs to ensure that all VMs in a subscription are deployed with a specific SKU or have mandatory tags. What should they use?'

Why candidates choose this

Candidates may confuse Azure Policy with autoscaling because both involve 'rules' and 'automation', leading them to think Policy can adjust capacity when it only enforces configuration standards.

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

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.