Skip to main content

Azure Virtual Machine Scale Sets (VMSS) for AZ-104

Azure Virtual Machine Scale Sets let you deploy and manage a group of identical, load‑balanced virtual machines that can automatically scale in or out based on demand. For the AZ‑104 exam, you need to understand not just what VMSS is, but how to configure it, monitor it, and decide when it’s the right solution for a workload. This guide covers architecture, autoscaling, availability, administration tasks, and the common scenarios you’ll encounter as an Azure Administrator.

What is Azure Virtual Machine Scale Sets?

A Virtual Machine Scale Set is an Azure compute resource that creates and manages a set of identical VMs from a common image and configuration. The service is designed to support elastic, high‑availability applications without requiring you to manage each VM individually.

Key characteristics:

  • Identical VM instances – All instances are based on the same base image (custom or Azure Marketplace).
  • Uniform configuration – Networking, extensions, and storage are applied consistently across instances.
  • Load balancing integration – The scale set can be placed behind an Azure Load Balancer or Application Gateway, which automatically distributes traffic to healthy instances.
  • Autoscaling – The number of instances can increase or decrease based on schedules or metrics such as CPU percentage, memory usage, or queue length.
  • Availability – Instances can be distributed across Availability Zones or Fault Domains to improve resiliency.
  • Elastic infrastructure – Scale sets enable you to match capacity to actual demand, avoiding over‑provisioning and reducing cost.

The following diagram illustrates the typical data flow for a scale set placed behind a load balancer:

Why VMSS Matters for AZ‑104

The Azure Administrator Associate exam focuses on operational tasks and platform management. VMSS touches several AZ‑104 skills, including deploying and managing compute resources, configuring networking, monitoring, and ensuring high availability. You should be comfortable with:

  • Administration responsibilities – Creating scale sets, updating images, managing capacity, and applying policies.
  • Scaling applications – Configuring manual, scheduled, and metric‑based autoscaling.
  • Cost optimization – Scaling down during off‑peak hours and right‑sizing instance counts.
  • High availability – Distributing instances across fault domains and zones to survive failures.
  • Infrastructure automation – Using VMSS to reduce manual intervention when demand changes.
  • Enterprise operations – Applying rolling upgrades, monitoring health, and troubleshooting scaling events.

The AZ‑104 exam expects you to choose the appropriate compute solution for a given requirement and to understand the implications of that choice.

Key Features

FeatureDescriptionAZ‑104 Importance
AutoscalingAutomatically add or remove instances based on metrics, schedules, or a target count.High – frequently tested in operational and cost‑optimization scenarios.
Load Balancer integrationSeamless connection with Azure Load Balancer (Basic and Standard) and Application Gateway.High – need to understand how traffic is distributed.
Availability ZonesInstances can be spread across zones to survive a datacenter failure.Medium – important for high‑availability designs.
Health monitoringCustom health probes determine if an instance should receive traffic or be repaired.High – required for diagnosing failed instances.
Rolling upgradesUpdate the OS or configuration without downtime, replacing instances in batches.Medium – operational practice for patching.
Automatic instance managementUnhealthy instances are automatically repaired (with automatic repair policy) or replaced.Medium – supports self‑healing.
Flexible orchestrationProvides high availability guarantees without requiring a specific fault domain count; allows mixing of different VM sizes and images.High – newer model often referenced in exam scenarios.
Managed disksEach instance gets its own managed disk(s) for persistence.Low – assumed knowledge.
Azure Monitor integrationMetrics, logs, and alerts are natively available for scale sets.Medium – operations and troubleshooting.

VMSS Architecture

At its core, a scale set is a collection of VM instances derived from a common base image. Key architectural elements:

  • VM instances – Each instance is a fully functional virtual machine with its own OS disk, data disks, and network interface.
  • Image‑based deployment – Instances are created from a standard image (Windows Server, Ubuntu, a custom image, or a shared image gallery). This ensures consistency across the set.
  • Backend pool – When linked with a load balancer, the scale set’s instances become members of the backend pool. The load balancer health probe determines which instances receive traffic.
  • Fault tolerance – Instances are distributed across fault domains (in regional deployments) and can span multiple Availability Zones for zone‑level resilience.

Flexible Orchestration

Microsoft recommends the Flexible orchestration mode for most new deployments. Flexible orchestration provides:

  • The ability to mix different VM sizes and images within the same scale set (useful when certain hardware is unavailable).
  • High availability without requiring a fixed fault domain count; Azure automatically spreads instances to maximize availability.
  • Better integration with Availability Zones and simplified management.

Autoscaling

Autoscaling is the most distinguishing feature of VMSS. It defines how and when the number of instances changes.

Scaling methods:

  • Manual scaling – You set a fixed instance count. Useful for predictable, steady workloads.
  • Schedule‑based scaling – Increase or decrease instances at specific times. Ideal for workloads that follow a known pattern (e.g., business hours).
  • Metric‑based scaling – Scale based on a metric such as CPU percentage, memory percentage, or any custom metric from Azure Monitor. Most flexible and responsive.

Scaling actions:

  • Scale out – Add instances when load increases.
  • Scale in – Remove instances when load decreases.

A comparison of common scaling triggers is shown below:

TriggerUse caseConsiderations
CPU percentageCompute‑bound web apps, batch processingSimple; ensure CPU correlates with load.
Memory percentageMemory‑intensive workloads (caches, analytics)Requires guest‑level metric; not available by default on all OS images.
Azure Queue lengthWorker roles processing messagesDirectly tied to work backlog; more accurate than CPU for queue‑driven apps.
Custom metricAny application‑specific metricRequires emitting custom metrics via Application Insights or Azure Monitor.

Scaling policies:
You can define both scale‑out and scale‑in rules with thresholds, cooldown periods, and instance limits. For example, scale out when CPU > 70% for 5 minutes, and scale in when CPU < 30% for 10 minutes. Cooldown periods prevent flapping.

High Availability

VMSS enhances availability by design.

  • Availability Zones – Instances can be explicitly placed across zones 1, 2, and 3 (if the region supports them). This provides protection against datacenter‑level failures.
  • Fault Domains – In regional (non‑zone) deployments, Azure automatically distributes instances across fault domains (physical racks) to limit the impact of hardware failures.
  • Load balancer integration – The load balancer’s health probe ensures that only healthy instances receive traffic. When an instance fails the probe, traffic stops being sent to it, and (if automatic repair is enabled) the instance may be replaced.
  • Automatic repair – Optionally, the scale set can automatically replace an instance that remains unhealthy for a specified period. This self‑healing reduces manual intervention.

Combining a scale set with Availability Zones and a Standard Load Balancer gives you a highly resilient, self‑healing architecture suitable for production workloads.

Monitoring and Management

As an Azure Administrator, you are responsible for observing and maintaining scale sets. The AZ‑104 exam covers the following monitoring aspects:

  • Azure Monitor metrics – Platform metrics such as CPU percentage, network in/out, and disk I/O are collected automatically. You can create dashboards and alerts on these metrics.
  • Guest‑level monitoring – To capture memory usage or disk free space, you need to enable guest diagnostics or install the Azure Monitor agent.
  • Activity Logs – Track administrative operations like scale‑out events, configuration changes, and VM restarts.
  • Boot diagnostics – Enable serial console and screenshot capture to troubleshoot VM boot failures.
  • Update management – Use Azure Update Manager or Azure Automation to apply OS patches across all instances in a rolling manner.
  • Guest patching – For Windows VMs, you can configure automatic guest patching to keep the OS up to date with minimal effort.

Monitoring helps you verify that autoscaling is working, detect performance bottlenecks, and respond to failures.

Common AZ‑104 Administration Tasks

The exam expects you to understand the following tasks conceptually (not via step‑by‑step tutorials):

  • Deploying VM Scale Sets – Choose between Uniform and Flexible orchestration, select a base image, define instance count, and configure networking (VNet, subnet, load balancer).
  • Updating VM images – Use rolling upgrade policies to apply OS or application updates with zero downtime. Understand the impact on availability during the upgrade.
  • Changing capacity – Manually adjust instance count or modify autoscale rules. Know that scaling in may terminate the oldest instance by default, and scaling out uses the latest model.
  • Monitoring health – Configure health probes and enable automatic repair.
  • Scaling policies – Write rules based on metrics, set cooldown periods, and define min/max instance counts.
  • Rolling upgrades – Understand batch size, pause time, and how to roll back if issues arise.
  • Managing VM instances – Stop, start, restart, or delete individual instances; view instance‑level metrics and boot diagnostics.

VM vs VM Scale Sets

Choosing between a standalone VM and a scale set depends on the workload’s scaling and availability needs.

CapabilityVirtual MachineVM Scale Sets
ScalingManual; single instance unless manually cloned.Automatic horizontal scaling (scale‑out/in) based on rules.
AvailabilityCan use Availability Sets or Zones individually.Built‑in distribution across fault domains/zones; automatic repair.
ManagementManage each VM individually.Manage a group as a single entity; rolling upgrades apply to all.
Load balancingMust be explicitly configured for each VM.Native integration with load balancer; instances automatically added to backend pool.
Image consistencyEach VM may differ over time.All instances based on a common image; reimage or rolling update maintains consistency.
AutomationRequires custom scripts or ARM templates for bulk deployment.Built‑in autoscaling and orchestration reduce scripting.
Typical workloadsSingle‑instance applications, legacy apps, stateful workloads.Stateless web apps, APIs, worker processing, microservices, batch jobs.

Typical AZ‑104 Exam Scenarios

The exam presents real‑world scenarios where you must identify the right compute solution. VMSS is often the correct choice in the following situations:

  • Web applications with variable traffic – A stateless web front‑end that experiences unpredictable spikes; autoscaling ensures capacity matches demand without manual intervention.
  • Seasonal workloads – A retail application that needs extra capacity during holiday sales; schedule‑based scaling reduces cost during off‑peak periods.
  • Batch processing – Worker instances that process messages from a queue; metric‑based scaling (on queue length) adds workers when the backlog grows.
  • Business continuity – A production workload requiring 99.95% or 99.99% availability; VMSS with Availability Zones and a Standard Load Balancer meets the SLA.
  • High availability – Applications that must survive multiple component failures; the scale set automatically replaces unhealthy instances.
  • Autoscaling decisions – The scenario may describe a current single‑VM deployment that fails under load; the correct answer often involves migrating to VMSS with autoscaling rules.

Best Practices

When designing and managing scale sets, follow these guidelines:

  • Use Availability Zones for production workloads to protect against zone‑level failures.
  • Configure autoscaling with appropriate cooldown periods to prevent flapping.
  • Monitor scaling events and create alerts for failed scale‑outs or unexpected scale‑ins.
  • Keep VM images standardized – Use a shared image gallery to ensure consistency and speed up deployments.
  • Use managed identities for secure access to Key Vault, Storage, and other services; avoid hard‑coded credentials in custom images or startup scripts.
  • Integrate monitoring and alerting – Use Azure Monitor to track metrics and diagnose issues; set up action groups to notify admins on critical events.

Common Mistakes

  • Confusing Availability Sets with VMSS – Availability Sets provide fault‑domain separation for individual VMs; VMSS provides autoscaling and load balancing on top of availability. They are not interchangeable.
  • Using VMSS for single‑instance workloads – Scale sets are designed for multiple, identical instances. A single‑instance application that cannot be scaled horizontally is better served by a standalone VM.
  • Ignoring autoscaling rules – Deploying a scale set without autoscaling defeats its primary purpose. Even a manual scale set may need rules for production elasticity.
  • Not monitoring scale events – Without alerts, you may not know if scaling failed due to quota limits, image problems, or misconfiguration.
  • Overprovisioning instances – Setting a minimum count that is too high wastes money. Analyze usage patterns and set realistic minimums.

Frequently Asked Questions

What is Azure VMSS?
Azure Virtual Machine Scale Sets is a service that deploys and manages a group of identical, auto‑scaling VMs integrated with load balancing. It is designed for elastic, highly available applications.

When should I use VM Scale Sets?
Use them for stateless workloads that need to scale horizontally based on demand, such as web front‑ends, APIs, worker roles, and batch processing. They are not suitable for applications that cannot run on multiple identical instances.

Does AZ‑104 cover autoscaling?
Yes. You must understand how to configure metric‑based and schedule‑based autoscaling, set instance limits, and choose appropriate metrics. The exam may present scenarios requiring you to select the correct scaling trigger.

What is Flexible Orchestration?
Flexible orchestration is the recommended deployment mode for VMSS. It provides high availability guarantees without requiring a fixed fault domain count, supports mixing different VM sizes and images, and integrates better with Availability Zones.

How is VMSS different from Availability Sets?
Availability Sets distribute standalone VMs across fault and update domains for high availability within a datacenter. VMSS provides autoscaling, load balancing, and automatic instance management on top of availability. They serve different purposes: Availability Sets for static sets of VMs, VMSS for elastic, scalable groups.

Key Takeaways

  • VM Scale Sets are the primary Azure service for running elastic, load‑balanced VM workloads.
  • They provide built‑in autoscaling, health monitoring, rolling upgrades, and load balancer integration.
  • For the AZ‑104 exam, focus on when to choose VMSS over standalone VMs, how to configure scaling, and how to maintain high availability.
  • Flexible orchestration is the modern deployment model; Availability Zones further improve resiliency.
  • Administration tasks like monitoring, updating images, and troubleshooting scaling events are essential Azure Administrator responsibilities.

Continue Learning

Learn More

Readers who want in‑depth implementation guidance, architecture best practices, deployment tutorials, and production recommendations can continue learning here:

Azure Virtual Machine Scale Sets - CloudComputingDevPro ↗

CloudCertPro focuses on certification preparation, while CloudComputingDevPro provides comprehensive engineering and implementation guidance.