You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Configure rolling upgrades on Virtual Machine Scale Sets (Preview)
13
13
@@ -33,16 +33,19 @@ Rolling upgrade policy is best suited for production workloads.
33
33
34
34
## Concepts
35
35
36
+
> [!NOTE]
37
+
> [Automatic OS image upgrades](virtual-machine-scale-sets-automatic-upgrade.md) and [automatic extension upgrades](../virtual-machines/automatic-extension-upgrade.md) automatically inherit the rolling upgrade policy and use it to perform upgrades.
38
+
36
39
|Setting | Description |
37
40
|---|---|
38
41
|**Upgrade Policy Mode**| The upgrade policy modes available on Virtual Machine Scale Sets are **Automatic**, **Manual**, and **Rolling**. |
39
42
|**Rolling upgrade batch size %**| Specifies how many of the total instances of your scale set you want to be upgraded at one time. <br><br>Example: A batch size of 20% when you have 10 instances in your scale set results in upgrade batches with two instances each. |
40
43
|**Pause time between batches (sec)**| Specifies how long you want your scale set to wait between upgrading batches.<br><br> Example: A pause time of 10 seconds means that once a batch is successfully completed, the scale set will wait 10 seconds before moving onto the next batch. |
41
44
|**Max unhealthy instance %**| Specifies the total number of instances allowed to be marked as unhealthy before and during the rolling upgrade. <br><br>Example: A max unhealthy instance % of 20 means if you have a scale set of 10 instances and more than two instances in the entire scale set report back as unhealthy, the rolling upgrade stops. |
42
45
|**Max unhealthy upgrade %**| Specifies the total number of instances allowed to be marked as unhealthy after being upgraded. <br><br>Example: A max unhealthy upgrade % of 20 means if you have a scale set of 10 instances and more than two instances in the entire scale set report back as unhealthy after being upgraded, the rolling upgrade is canceled. <br><br>Max unhealthy upgrade % is an important setting because it allows the scale set to catch unstable or poor updates before they roll out to the entire scale set. |
43
-
|**Prioritize unhealthy instances**| Tells the scale set to upgrade instances marked as unhealthy before upgrading instances marked as healthy. <br><br>Example: If some instances in your scale set that show as failed or unhealthy when a rolling upgrade begins, the scale set updates those instances first. |
46
+
|**Prioritize unhealthy instances**| Tells the scale set to upgrade instances marked as unhealthy before upgrading instances marked as healthy. <br><br>Example: If some instances in your scale are failed or unhealthy when a rolling upgrade begins, the scale set updates those instances first. |
44
47
|**Enable cross-zone upgrade**| Allows the scale set to ignore Availability Zone boundaries when determining batches. |
45
-
|**MaxSurge**| With MaxSurge enabled, new instances are created in batches using the latest scale model. Once the batch of new instances are successfully created and marked as healthy, they begin taking traffic. The scale set then deletes instances in batches matching the old scale set model. This continues until all instances are brought up-to-date. rolling upgrades with MaxSurge can help improve service uptime during upgrade events. <br><br>With MaxSurge disabled, the existing instances in a scale set are brought down in batches to be upgraded. Once the upgraded batch is complete, the instances begin taking traffic again, and the next batch begins. This continues until all instances brought up-to-date. |
48
+
|**MaxSurge**| With MaxSurge enabled, new instances are created in batches using the latest scale model. Once the batch of new instances is successfully created and marked as healthy, they begin taking traffic. The scale set then deletes instances in batches matching the old scale set model. This continues until all instances are brought up-to-date. rolling upgrades with MaxSurge can help improve service uptime during upgrade events. <br><br>For more information see [MaxSurge rolling upgrades](virtual-machine-scale-sets-maxsurge.md). |
46
49
47
50
48
51
## Setting or updating the rolling upgrade policy
@@ -233,7 +236,7 @@ Stop-AzVmssRollingUpgrade `
233
236
If you decide to cancel a rolling upgrade or the upgrade has stopped due to any policy breach, any more changes that result in another scale set model change trigger a new rolling upgrade. If you want to restart a rolling upgrade, trigger a generic model update. This tells the scale set to check if all the instances are up to date with the latest model.
234
237
235
238
### [CLI](#tab/cli4)
236
-
To restart a rolling upgrade after its been canceled, you need to trigger the scale set to check if the instances in the scale set are up to date with the latest scale set model. You can do this by running [az vmss update](/cli/azure/vmss#az-vmss-update).
239
+
To restart a rolling upgrade after it has been canceled, trigger the scale set to check if the instances in the scale set are up to date with the latest scale set model. You can do this by running [az vmss update](/cli/azure/vmss#az-vmss-update).
237
240
238
241
```azurecli
239
242
az vmss update \
@@ -242,7 +245,7 @@ az vmss update \
242
245
```
243
246
244
247
### [PowerShell](#tab/powershell4)
245
-
To restart a rolling upgrade after its been canceled, you need to trigger the scale set to check if the instances in the scale set are up to date with the latest scale set model. You can do this by running [Update-AzVmss](/powershell/module/az.compute/update-azvmss).
248
+
To restart a rolling upgrade after it's been canceled, you need to trigger the scale set to check if the instances in the scale set are up to date with the latest scale set model. You can do this by running [Update-AzVmss](/powershell/module/az.compute/update-azvmss).
Copy file name to clipboardExpand all lines: articles/virtual-machine-scale-sets/virtual-machine-scale-sets-maxsurge.md
+33-24Lines changed: 33 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,9 @@ author: mimckitt
5
5
ms.author: mimckitt
6
6
ms.topic: overview
7
7
ms.service: virtual-machine-scale-sets
8
-
ms.date: 7/19/2024
8
+
ms.date: 7/23/2024
9
9
ms.reviewer: ju-shim
10
-
ms.custom: upgradepolicy
10
+
ms.custom: upgradepolicy. maxsurge
11
11
---
12
12
# Rolling upgrades with MaxSurge on Virtual Machine Scale Sets (Preview)
13
13
@@ -18,20 +18,45 @@ ms.custom: upgradepolicy
18
18
>
19
19
> Previews are made available to you on the condition that you agree to the [supplemental terms of use](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). Some aspects of these features may change prior to general availability (GA).
20
20
21
-
Rolling upgrades with MaxSurge can help improve service uptime during upgrade events.
21
+
Rolling upgrades with MaxSurge can help improve service uptime during upgrade events. With MaxSurge enabled, new instances are created in batches using the latest scale model. When the new instances are fully created and healthy, they begin taking traffic. The scale set then deletes instances in batches matching the old scale set model. The process continues until all instances are brought up-to-date.
22
22
23
-
With MaxSurge enabled, new instances are created in batches using the latest scale model. When the batch of new instances are fully created and healthy, they begin taking traffic. The scale set then deletes instances in batches matching the old scale set model. The process continues until all instances are brought up-to-date.
23
+
## Concepts
24
24
25
+
> [!NOTE]
26
+
> [Automatic OS image upgrades](virtual-machine-scale-sets-automatic-upgrade.md) and [automatic extension upgrades](../virtual-machines/automatic-extension-upgrade.md) automatically inherit the rolling upgrade policy and use it to perform upgrades. If MaxSurge is enabled in your rolling upgrade policy, automatic OS image upgrades and automatic extension upgrades will also be applied using the MaxSurge upgrade method.
27
+
28
+
|Setting | Description |
29
+
|---|---|
30
+
|**Rolling upgrade batch size %**| Specifies how many of the instances in your scale set you want to be upgraded at one time. <br><br>Example: A batch size of 20% when you have 10 instances in your scale set results in upgrade batches with two instances each. When using MaxSurge, this results in two instances being created in each batch. |
31
+
|**Pause time between batches (sec)**| Specifies how long you want your scale set to wait between upgrading batches.<br><br> Example: With MaxSurge enabled, a pause time of 10 seconds means that once the new instances are successfully provisioned and are reporting as healthy, the scale set will wait 10 seconds before moving onto the next batch. |
32
+
|**Max unhealthy instance %**| Specifies the total number of instances allowed to be marked as unhealthy before and during the MaxSurge upgrade. <br><br>Example: A max unhealthy instance % of 20 means if you have a scale set of 10 instances and more than two of your instances in the entire scale set report back as unhealthy, the rolling upgrade stops. |
33
+
|**Max unhealthy upgrade %**| Specifies the total number of new instances allowed to be marked as unhealthy after being upgraded. <br><br>Example: A max unhealthy upgrade % of 20 means if you have a scale set of 10 instances and more than two of the newly created instances report back as unhealthy after being upgraded, the rolling upgrade is canceled. <br><br>Max unhealthy upgrade % is an important setting because it allows the scale set to catch unstable or poor updates before they roll out to the entire scale set. |
34
+
|**Prioritize unhealthy instances**| Tells the scale set to upgrade instances marked as unhealthy before upgrading instances marked as healthy. <br><br>Example: If some instances in your scale set are failed or unhealthy when a MaxSurge upgrade begins, the scale set replaces those instances first. |
35
+
|**Enable cross-zone upgrade**| Allows the scale set to ignore Availability Zone boundaries when determining batches. This means a batch may contain instances in multiple availability zones at the same time depending on the batch size and the size of your scale set. |
36
+
37
+
## Considerations
38
+
39
+
When using rolling upgrades with MaxSurge, new virtual machines are created using the latest scale set model to replace virtual machines using the old scale set model. These newly created virtual machines counts towards your overall core quota. Additionally, these new virtual machines have new IP addresses and be placed into an existing subnet. You also need to have enough IP address quota and subnet space available to deploy these newly created virtual machines.
25
40
26
-
## How it works
41
+
During the rolling upgrade processes, Azure performs a quota check before each new batch. If that quota check fails, the rolling upgrade will be canceled. You can restart a rolling upgrade by making a new change to the scale set model or triggering a generic model update. For more information, see [restart a rolling upgrade](virtual-machine-scale-sets-configure-rolling-upgrades.md#restart-a-rolling-upgrade).
42
+
43
+
## MaxSurge vs in place upgrades
44
+
45
+
### MaxSurge upgrades
27
46
28
47
Rolling upgrades with MaxSurge creates new instances with the latest scale set model to replace instances running with the old model. By creating new instances, you can ensure that your scale set capacity doesn't drop below the set instance count during the duration of the upgrade process.
29
48
30
49
:::image type="content" source="./media/upgrade-policy/maxsurge-upgrade.png" alt-text="Diagram that shows the process of performing a rolling upgrade with MaxSurge.":::
31
50
51
+
### In place upgrades
52
+
53
+
Rolling upgrades with MaxSurge disabled performs upgrades in place. Depending on the type of upgrade, the virtual machines may not be available for traffic during the upgrade process. This may reduce your scale set capacity during the upgrade process but doesn't consume any extra quota.
54
+
55
+
:::image type="content" source="./media/upgrade-policy/in-place-upgrade.png" alt-text="Diagram that shows the process of performing a rolling upgrade without MaxSurge.":::
56
+
32
57
33
58
## Configure rolling upgrades with MaxSurge
34
-
Enabling or disabling MaxSurge can be done at any point in time. This includes during or after scale set provisioning. When using a rolling upgrade policy, the scale set must also use the [Application Health Extension](virtual-machine-scale-sets-health-extension.md) have a [health probe](../load-balancer/load-balancer-custom-probe-overview.md). It's suggested to create the scale set with a manual upgrade policy and update the policy to rolling after successfully confirming the application health is being properly reported.
59
+
Enabling or disabling MaxSurge can be done during or after scale set provisioning. When using a rolling upgrade policy, the scale set must also use the [Application Health Extension](virtual-machine-scale-sets-health-extension.md) have a [health probe](../load-balancer/load-balancer-custom-probe-overview.md). It's suggested to create the scale set with a manual upgrade policy and update the policy to rolling after successfully confirming the application health is being properly reported.
35
60
36
61
37
62
### [Portal](#tab/portal)
@@ -102,24 +127,8 @@ Update the properties section of your ARM template and set the upgrade policy to
102
127
---
103
128
## Frequently asked questions
104
129
105
-
### Is MaxSurge generally available for Virtual Machine Scale Sets with Uniform Orchestration?
106
-
Yes. All upgrade policies including rolling upgrades with MaxSurge are generally available for Virtual Machine Scale Sets with Uniform Orchestration.
107
-
108
-
109
-
### Is MaxSurge generally available for Virtual Machine Scale Sets with Flexible Orchestration?
110
-
No. All upgrade policies including rolling upgrades with MaxSurge are in Public Preview for Virtual Machine Scale Sets with Flexible Orchestration.
111
-
112
-
### Do MaxSurge upgrades require more quota?
113
-
Yes. When using rolling upgrades with MaxSurge, new virtual machines are created using the latest scale set model to replace virtual machines using the old scale set model. These newly created virtual machines counts towards your overall core quota.
114
-
115
-
### Do MaxSurge upgrades require additional IP addresses?
116
-
Yes. These newly created virtual machines have new IP addresses and count towards your total allowed IP addresses available per your subscription.
117
-
118
-
### Do MaxSurge upgrades require additional subnet space?
119
-
Yes. These newly created virtual machines have new IP addresses and there needs to be enough space available in the specified subnet to be added.
120
-
121
130
### What triggers a MaxSurge upgrade?
122
-
Any changes that result in an update to the scale set model result in a MaxSurge upgrade. This includes upgrades that generally don't require a restart such as adding Data Disks.
131
+
Any changes that result in an update to the scale set model result in a MaxSurge upgrade. These also include upgrades that generally don't require a restart such as adding Data Disks.
123
132
124
133
### Can I cancel a MaxSurge upgrade?
125
134
Yes. The process of canceling a MaxSurge upgrade is the same as canceling an in place rolling upgrade. You can stop the upgrade from the Azure portal, CLI, PowerShell, or any other SDK.
@@ -130,5 +139,5 @@ During a MaxSurge upgrade, new virtual machines are created to replace virtual m
130
139
131
140
132
141
## Next steps
133
-
Learn how to [set the upgrade policy](virtual-machine-scale-sets-set-upgrade-policy.md) of your Virtual Machine Scale Set.
142
+
To learn more about upgrades for Virtual Machine Scale Sets, see [configure rolling upgrade policy](./virtual-machine-scale-sets-configure-rolling-upgrades.md).
0 commit comments