Why VMs Still Matter
Even in a cloud-first world, many organizations still run legacy applications or workloads that require OS-level control. Azure Virtual Machines (VMs) provide IaaS flexibility while Azure VM Scale Sets (VMSS) enable elasticity and automation for large deployments.
As a Solution Architect, you need to know when VMs are the right fit and how to design them for resiliency, performance, and cost efficiency.
Azure Virtual Machines
Key Features
-
Full control over OS and applications.
-
Wide choice of VM sizes (general-purpose, compute-optimized, memory-optimized, GPU, HPC).
-
Custom images and extensions supported.
-
Can integrate with Availability Zones and Load Balancers.
Best Use Cases
-
Legacy workloads not supported in PaaS.
-
Apps requiring OS-level control.
-
Specialized workloads (e.g., GPU for AI/ML, HPC clusters).
VM Availability Design
-
Availability Sets → Protect against rack-level failures.
-
Distributes VMs across fault domains (power, network).
-
Distributes VMs across update domains (patching).
-
SLA = 99.95%.
-
-
Availability Zones → Protect against datacenter-level failures.
-
VMs spread across physically separate zones.
-
SLA = 99.99%.
-
-
Paired Regions → Use for disaster recovery (Geo-redundant design).
VM Scale Sets (VMSS)
Definition:
-
Group of identical VMs that scale in/out automatically.
Key Features:
-
Supports autoscaling based on CPU, memory, or custom metrics.
-
Integrates with Load Balancers and Application Gateways.
-
Uniform model (identical VMs) or Flexible orchestration (mix of VM sizes).
-
Integrates with Spot VMs for cost optimization.
Best Use Cases:
-
Web farms with fluctuating traffic.
-
Compute-intensive batch jobs.
-
Microservices running on identical VM instances.
Design Considerations
-
Cost
-
Use Reserved Instances or Spot VMs for savings.
-
Right-size VMs based on workload needs.
-
Resiliency
-
Place VMs in Availability Sets/Zones for HA.
-
Design VMSS with multiple fault domains.
-
Scaling
-
Configure autoscaling rules (CPU > 70%, scale out; CPU < 30%, scale in).
-
Plan for scale-in cooldown to avoid flapping.
-
Management
-
Use Azure Policy to enforce VM configurations.
-
Apply Update Management for patching.
Example Enterprise Scenario
An e-commerce platform needs:
-
Legacy payment gateway running on Windows Server.
-
Web tier that scales up during holiday traffic.
-
99.99% uptime requirement.
Correct design:
-
Deploy VMs for payment gateway (requires OS control).
-
Deploy VM Scale Sets for web tier with autoscaling.
-
Place VMs in Availability Zones for resiliency.
-
Use Load Balancer for traffic distribution.
Confusion Buster
-
Availability Set vs Availability Zone
-
Set = rack-level protection.
-
Zone = datacenter-level protection.
-
-
VMSS vs Load Balancer
-
VMSS = scaling engine.
-
Load Balancer = distributes traffic across scaled instances.
-
-
VMSS Uniform vs Flexible
-
Uniform = identical VMs.
-
Flexible = multiple VM sizes, useful for mixed workloads.
-
Exam Tips
-
“Which feature provides HA against datacenter failures?” → Availability Zones.
-
“Which ensures VMs are not patched simultaneously?” → Availability Sets (update domains).
-
“Which service auto-scales VMs based on CPU load?” → VMSS.
-
“Which is cheapest for dev/test workloads?” → Spot VMs.
What to Expect in the Exam
-
Direct Q: “Which feature groups identical VMs for autoscaling?” → VMSS.
-
Scenario Q: “Company needs legacy app on Windows Server with HA across datacenters.” → VM in Availability Zones.
-
Scenario Q: “Company requires autoscaling VM cluster with cost savings during low usage.” → VMSS + Spot VMs.
-
Trick Q: “Availability Sets protect against datacenter outages.” → False (only Zones do).