Course contentsShow
← Cloud and Infrastructure
Lesson 324 of 2,9896. Auto ScalingFree lesson

VMSS Health Monitoring and Automatic Repairs

Application health extension, load balancer probes, and automatic instance repair configuration.

VMSS Health Monitoring and Automatic Repairs

What you'll learn: How Azure Virtual Machine Scale Sets detect unhealthy instances and automatically fix them to maintain availability.

The Core Idea

When running multiple VM instances in a scale set, some may become unhealthy due to application crashes, OS issues, or network problems. Rather than manually detecting and replacing failed instances, VMSS can automatically monitor instance health and repair broken VMs—keeping your application running smoothly without intervention.

How Health Monitoring Works

VMSS uses two primary methods to determine if an instance is healthy:

Application Health Extension: A lightweight agent installed on each VM that reports whether the application inside is responding correctly. Think of it like a nurse checking each patient's vital signs in a hospital ward.

Load Balancer Probes: If your VMSS is behind a load balancer, those health checks (pinging specific endpoints) signal VMSS about instance health. If a VM fails probes consistently, VMSS knows something's wrong.

Automatic Instance Repairs

When VMSS detects an unhealthy instance, the automatic repair feature kicks in. VMSS will:

  1. Mark the instance as unhealthy
  2. Delete the faulty VM
  3. Create a fresh replacement instance using your template
  4. Maintain your desired capacity throughout

You configure a "grace period" (typically 30+ minutes) before repairs begin—giving temporary issues time to self-resolve and preventing premature replacements during deployments or updates.

Why This Matters

Without automatic repairs, a failed instance reduces capacity until you manually intervene. With it enabled, VMSS acts as a self-healing system—detecting problems and maintaining healthy capacity automatically.

Key Takeaway: VMSS health monitoring (via application extensions or load balancer probes) combined with automatic repair configuration creates self-healing infrastructure that replaces unhealthy instances without manual intervention.