Blog Post

Azure Compute Blog
2 MIN READ

Public Preview: Custom metrics for rolling upgrades on Virtual Machine Scale Sets

micahmckittrick's avatar
Nov 19, 2024

Today we are announcing the public preview of custom metrics for rolling upgrades on Virtual Machine Scale Sets.

Custom metrics for rolling upgrades enables you to utilize the application health extension to emit custom metrics to your Virtual Machine Scale Set. These custom metrics can be used to tell the scale set the order in which virtual machines should be updated when a rolling upgrade is triggered. Custom metrics can also inform your scale set when an upgrade should be skipped on a specific instance. Custom metrics can be used in combination with other rolling upgrade functionality such as automatic OS upgradesautomatic extension upgrades and MaxSurge rolling upgrades.

Key benefits

  • More control over the order in which instances are upgraded.
  • Skip upgrades on specific instances while ensuring the rest of the fleet is upgraded.
  • Integrates with rolling upgrade policy, application health extension, automatic OS upgrades, and automatic extension upgrades.
Phase ordering

A phase is a grouping construct for virtual machines. Each phase is determined by setting metadata emitted from the application health extension via the customMetrics property. The Virtual Machine Scale Set takes the information retrieved from the custom metrics and uses it to place virtual machines into their assigned phases. Within each phase, the Virtual Machine Scale set will also assign upgrade batches. Each batch is configured using the rolling upgrade policy which takes into consideration the update domains (UD), fault domains (FD), and zone information of each virtual machine.

Skip upgrade

Skip upgrade functionality enables an individual instance to be omitted from an upgrade during the rolling upgrade. This is similar to utilizing instance protection but can more seamlessly integrate into the rolling upgrade workflow and into instance level applications. Similar to phase ordering, the skip upgrade information is passed to the Virtual Machine Scale Set via the application health extension and custom metrics settings. When the rolling upgrade is triggered, the Virtual Machine Scale Set checks the response of the application health extensions custom metrics and if skip upgrade is set to true, the instance is not included in the rolling upgrade.

Available Now

Custom metrics for rolling upgrades is available in all public Azure regions. Learn more about custom metrics for rolling upgrades on Virtual Machine Scale Sets.

Updated Nov 25, 2024
Version 2.0