Why is there a long delay between VMSS rolling update batches?

Mark Nickeson 1 Reputation point
2021-12-08T15:03:05.21+00:00

I have set up rolling updates in a VMSS. I initiate the update by setting a revised custom script using CLI.

However, I notice that there is a very long delay between update batches. For example I observe healthy --> unhealthy --> healthy cycle while a VM is updated which takes no more than 15-20 seconds. But then it is typically 3-5 minutes delay until the next VM update begins. As well, after the last VM has updated successfully for 3-5 minutes both the portal and the CLI continue to report "rolling update" in progress.

I have ensured that pause between batches is set to PT0S.

How can the observed delay be eliminated? If the delay is an unavoidable "feature" of rolling updates I will have to consider other options.

Thank you

Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
426 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. srbhatta-MSFT 8,576 Reputation points Microsoft Employee
    2021-12-09T21:34:20.377+00:00

    Hi @Mark Nickeson

    The delay in between batches can be manually configured by setting the 'pause time between batches' value as per your requirement, by default it is 0 seconds (PT0S). This will ensure that the mentioned pause time is applied before completing the update for all the virtual machines in one batch before starting the update process for the next batch of VMSS instances. You should be able see 'updating' status on the Portal for the first batch, and then observe the mentioned pause time before the next batch goes into updating state.

    Links to refer:
    https://learn.microsoft.com/en-us/rest/api/compute/virtual-machine-scale-set-rolling-upgrades/get-latest
    https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-upgrade-scale-set

    Hope this helps.

    Please 'Accept as answer' if the provided information is helpful to help others in the community looking for help on similar topics.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.