Skip to content

Commit ea76fbe

Browse files
Merge pull request #289769 from sipastak/dynamic-autoscale
Dynamic autoscale
2 parents 2447663 + 6d34291 commit ea76fbe

File tree

6 files changed

+287
-40
lines changed

6 files changed

+287
-40
lines changed

articles/virtual-desktop/autoscale-create-assign-scaling-plan.md

Lines changed: 206 additions & 15 deletions
Large diffs are not rendered by default.

articles/virtual-desktop/autoscale-faq.yml

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
description: Frequently asked questions and best practices for Azure Virtual Desktop.
55
author: dknappettmsft
66
ms.topic: faq
7-
ms.date: 02/28/2024
7+
ms.date: 11/19/2024
88
ms.author: daknappe
99
ms.custom: docs_inherited
1010
title: Azure Virtual Desktop autoscale FAQ
@@ -14,16 +14,6 @@ summary: This article answers frequently asked questions about how to use autosc
1414
sections:
1515
- name: General questions
1616
questions:
17-
- question: |
18-
Does autoscale create or delete virtual machines (VMs) based on service load?
19-
answer: |
20-
No.
21-
22-
- question: |
23-
Does autoscale change the SKU or size of VMs?
24-
answer: |
25-
No.
26-
2717
- question: |
2818
Can I configure scaling for specific dates like holidays?
2919
answer: |
@@ -141,4 +131,41 @@ sections:
141131
- question: |
142132
What happens if I opt for personal desktops to get hibernated in my scaling plan, but my personal desktops don't have hibernate enabled?
143133
answer: |
144-
If you opt to have personal desktops hibernated in your personal scaling plan schedule, but the personal desktops don't have hibernate enabled, autoscale won't do anything to your session hosts (won't hibernate them and won't deallocate them).
134+
If you opt to have personal desktops hibernated in your personal scaling plan schedule, but the personal desktops don't have hibernate enabled, autoscale won't do anything to your session hosts (won't hibernate them and won't deallocate them).
135+
136+
- name: Dynamic scaling (preview)
137+
questions:
138+
- question: |
139+
Will the minimum host pool size defined in the scaling plan override the settings in the host pool?
140+
answer: |
141+
Yes. The minimum host pool size will override the number of session hosts you defined in the host pool.
142+
143+
- question: |
144+
Do I need to specify whether to turn on or create session hosts in each phase?
145+
answer: |
146+
No. You only need to define the session host limit with the minimum host pool size, the maximum host pool size, and the minimum percentage of active hosts (%). When the actual number of session hosts needed isn't larger than the minimum host pool size, autoscale will turn on session hosts if the used host pool capacity exceeds your defined capacity threshold. When the actual number of session hosts needed is larger than the minimum host pool size, autoscale will turn on the stopped session hosts and create additional session hosts. The total number of active session hosts won’t exceed the maximum host pool size defined in the scaling plan if the used host pool capacity exceeds your defined capacity threshold.
147+
148+
- question: |
149+
Which image version is used for the session hosts created by autoscale?
150+
answer: |
151+
Autoscale creates session hosts with the latest valid/stable image version defined in the default session host configuration, if you don’t already have an active session host configuration.
152+
153+
- question: |
154+
How can I configure my scaling plan to only turn on and deallocate session hosts?
155+
answer: |
156+
You can either choose power management autoscaling as the scaling method when you create your scaling plan, or with dynamic autoscaling you can set the same value for **Minimum host pool size** and **Maximum host pool size**.
157+
158+
- question: |
159+
How can I configure my scaling plan to only create and delete session hosts?
160+
answer: |
161+
You can set the **Minimum percentage of active hosts (%)** to 100. Autoscale only creates or delete session hosts if the used host pool capacity exceeds or drops below your defined capacity threshold.
162+
163+
- question: |
164+
What happens if the number of session hosts in the host pool exceeds the maximum host pool size?
165+
answer: |
166+
This might happen if the **Maximum host pool size** is configured differently in each phase. Autoscale deletes the active deallocated session hosts with no sessions to honor the **Maximum host pool size** setting in the current phase, and then continue to delete/deallocate session hosts based on the schedule and capacity threshold except in the ramp-up phase. No delete/deallocate action is taken as long as the number of session hosts in the host pool doesn't exceed the maximum host pool size. This behavior is consistent with the power management autoscaling scaling method, where session hosts aren't deallocated in the ramp-up phase for pooled host pools.
167+
168+
- question: |
169+
Can I still manually create and delete session hosts?
170+
answer: |
171+
Yes, but when autoscale deletes a session host that you manually created, it will honor the settings you set whether to automatically delete the NIC and/or disk.

articles/virtual-desktop/autoscale-glossary.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Azure Virtual Desktop autoscale glossary for Azure Virtual Desktop - Azur
33
description: A glossary of terms and concepts for the Azure Virtual Desktop autoscale feature.
44
author: dknappettmsft
55
ms.topic: conceptual
6-
ms.date: 11/01/2023
6+
ms.date: 11/19/2024
77
ms.author: daknappe
88
ms.custom: docs_inherited
99
---
@@ -13,7 +13,15 @@ This article is a list of definitions for key terms and concepts related to the
1313

1414
## Autoscale
1515

16-
Autoscale is Azure Virtual Desktop’s native scaling service that turns VMs on and off based on the capacity of the host pools and the [scaling plan](#scaling-plan) [schedule](#schedule) you define.
16+
Autoscale is Azure Virtual Desktop's native scaling service that scales session hosts up and down based on the capacity of the host pools and the [scaling plan](#scaling-plan) [schedule](#schedule) you define.
17+
18+
## Scaling method
19+
20+
The scaling method you choose defines how the scaling service manages the available capacity. There are two scaling methods you can choose from:
21+
22+
- **Power management autoscaling**: powers on and off session hosts to adjust to the available capacity in a host pool. If you want to apply a scaling plan to a host pool with standard management, this is the option that you should use.
23+
24+
- **Dynamic autoscaling (preview)**: powers on and off session hosts and creates and deletes session hosts to adjust to the available capacity in a host pool. Dynamic autoscaling can only be used for pooled host pools with session host configuration.
1725

1826
## Scaling tool
1927

@@ -53,8 +61,8 @@ The capacity threshold is the percentage of a [host pool's capacity](#available-
5361

5462
For example:
5563

56-
- If the [used host pool capacity](#used-host-pool-capacity) is below the capacity threshold and autoscale can turn off virtual machines (VMs) without going over the capacity threshold, then the feature will turn off the VMs.
57-
- If the used host pool capacity goes over the capacity threshold, then autoscale will turn on more VMs until the used host pool capacity goes below the capacity threshold.
64+
- If the [used host pool capacity](#used-host-pool-capacity) is below the capacity threshold and autoscale can turn off or delete session hosts without going over the capacity threshold, then dynamic autoscaling turns off or deletes the session hosts.
65+
- If the used host pool capacity goes over the capacity threshold, then autoscale turns on or creates more session hosts until the used host pool capacity goes below the capacity threshold.
5866

5967
## Available host pool capacity
6068

articles/virtual-desktop/autoscale-scenarios.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,33 @@ title: Autoscale scaling plans and example scenarios in Azure Virtual Desktop
33
description: Information about autoscale and a collection of four example scenarios that illustrate how various parts of autoscale for Azure Virtual Desktop work.
44
author: dknappettmsft
55
ms.topic: conceptual
6-
ms.date: 10/01/2024
6+
ms.date: 11/19/2024
77
ms.author: daknappe
88
ms.custom: references_regions, docs_inherited
99
---
1010
# Autoscale scaling plans and example scenarios in Azure Virtual Desktop
1111

12+
> [!IMPORTANT]
13+
> Dynamic autoscaling for pooled host pools with session host configuration is currently in PREVIEW. See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
14+
1215
Autoscale lets you scale your session host virtual machines (VMs) in a host pool up or down according to schedule to optimize deployment costs.
1316

1417
> [!NOTE]
1518
> - Azure Virtual Desktop (classic) doesn't support autoscale.
1619
> - You can't use autoscale and [scale session hosts using Azure Automation](set-up-scaling-script.md) on the same host pool. You must use one or the other.
17-
> - Autoscale is available in Azure and Azure Government in the same regions you can [create host pools](create-host-pools-azure-marketplace.md) in.
18-
> - Autoscale support for Azure Stack HCI with Azure Virtual Desktop is currently in PREVIEW. See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
20+
> - Power management autoscaling is available in Azure and Azure Government in the same regions you can [create host pools](create-host-pools-azure-marketplace.md) in.
21+
> - Dynamic autoscaling is only available in Azure and isn't supported in Azure Government.
1922
2023
For best results, we recommend using autoscale with VMs you deployed with Azure Virtual Desktop Azure Resource Manager (ARM) templates or first-party tools from Microsoft.
2124

2225
## How a scaling plan works
2326

27+
A scaling plan defines the schedules for scaling session hosts in a host pool. You can assign one scaling plan to multiple host pools. Each host pool can only have one scaling plan assigned to it. There are two different scaling methods you can choose from when creating a scaling plan:
28+
29+
- **Power management autoscaling**: powers on and off session hosts to adjust to the available capacity in a host pool. If you want to apply a scaling plan to a host pool with standard management, this is the option that you should use.
30+
31+
- **Dynamic autoscaling (preview)**: powers on and off session hosts and creates and deletes session hosts to adjust to the available capacity in a host pool. Dynamic autoscaling can only be used for pooled host pools with session host configuration.
32+
2433
Before you create your plan, keep the following things in mind:
2534

2635
- You can assign one scaling plan to one or more host pools of the same host pool type. The scaling plan's schedules will be applied to all assigned host pools.
@@ -154,7 +163,7 @@ In this scenario, we'll show that autoscale turns off session hosts when all of
154163
- The used host pool capacity is below the capacity threshold.
155164
- Autoscale can turn off session hosts without exceeding the capacity threshold.
156165
- Autoscale only turns off session hosts with no user sessions on them (unless the scaling plan is in ramp-down phase and you've enabled the force logoff setting).
157-
- Pooled autoscale will not turn off session hosts in the ramp-up phase to avoid bad user experience.
166+
- Pooled autoscale won't turn off session hosts in the ramp-up phase to avoid bad user experience.
158167

159168

160169
For this scenario, the host pool starts off looking like this:
@@ -176,7 +185,7 @@ Because we're in the peak phase, we can expect the number of users to remain rel
176185

177186
So, let's say that there are seven users signed in during peak hours. If the total number of user sessions is seven, that would make the used host pool capacity 28%. Because autoscale can't turn off a session host without the used host pool capacity exceeding the capacity threshold, autoscale won't turn off any session hosts yet.
178187

179-
If two of the seven users sign out during their lunch break, that leaves five user sessions across five session hosts. Since the maximum session limit is still five, the available host pool capacity is 25. Having only five users means that the used host pool capacity is now 20%. autoscale must now check if it can turn off a session host without making the used host pool capacity go above the capacity threshold.
188+
If two of the seven users sign out during their lunch break, that leaves five user sessions across five session hosts. Since the maximum session limit is still five, the available host pool capacity is 25. Having only five users means that the used host pool capacity is now 20%. Autoscale must now check if it can turn off a session host without making the used host pool capacity go above the capacity threshold.
180189

181190
If autoscale turned off a session host, the available host pool capacity would be 20. With five users, the used host pool capacity would then be 25%. Because 25% is less than the capacity threshold of 30%, autoscale will select a session host without user sessions on it, put it in drain mode, and turn it off.
182191

@@ -260,7 +269,11 @@ If at this point another user signs out, that leaves only three user sessions di
260269
|User sessions | 3 |
261270
|Used host pool capacity | 30% |
262271

263-
Because the maximum session limit is still five and the available host pool capacity is 10, the used host pool capacity is now 30%. Autoscale can now turn off one session host without exceeding the capacity threshold. Autoscale turns off a session host by choosing the session host with the fewest number of user sessions on it. Autoscale then puts the session host in drain mode, sends users a notification that says the session host will be turned off, then after a set amount of time, forcibly signs any remaining users out and turns it off. After doing so, there's now one remaining available session host in the host pool with a maximum session limit of five, making the available host pool capacity five.
272+
Because the maximum session limit is still five and the available host pool capacity is 10, the used host pool capacity is now 30%. Autoscale can now turn off one session host without exceeding the capacity threshold.
273+
274+
Autoscale turns off a session host by choosing the session host with the fewest number of user sessions on it. Autoscale then puts the session host in drain mode, sends users a notification that says the session host will be turned off, then after a set amount of time, forcibly signs out any remaining users and turns it off.
275+
276+
After turning off the session host, there's now one remaining available session host in the host pool with a maximum session limit of five, making the available host pool capacity five.
264277

265278
Since autoscale forced a user to sign out when turning off the chosen session host, there are now only two user sessions left, which makes the used host pool capacity 40%.
266279

articles/virtual-desktop/host-pool-management-approaches.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn about the different host pool management approaches of sessio
44
ms.topic: conceptual
55
author: dknappettmsft
66
ms.author: daknappe
7-
ms.date: 10/01/2024
7+
ms.date: 11/19/2024
88
---
99

1010
# Host pool management approaches for Azure Virtual Desktop
@@ -27,7 +27,7 @@ Creating, updating, and scaling session hosts in a host pool can require much ef
2727

2828
- *[Session host update](session-host-update.md)* updates session hosts **when** there's an update made to the session host configuration. Session host update ensures that all session hosts in the pool have the same configuration.
2929

30-
- *[Autoscale](autoscale-scenarios.md)* dynamically scales the number of session hosts depending on-demand, by powering on and powering off session hosts.
30+
- *[Autoscale](autoscale-scenarios.md)* dynamically scales the number of session hosts up and down based on the actual usage and the schedules defined in the scaling plan.
3131

3232
> [!IMPORTANT]
3333
> - The session host configuration management approach can be used with pooled host pools only. When using a host pool with a session host configuration, you can't create, update or scale session hosts outside of the Azure Virtual Desktop service using tools designed for host pools with standard management.
@@ -92,7 +92,7 @@ The following table compares the management approach of host pools with a sessio
9292
|---|---|---|
9393
| Create session hosts | [Add session hosts](add-session-hosts-host-pool.md?pivots=host-pool-session-host-configuration) using the Azure portal based on the session host configuration. You can't retrieve a registration token to add session hosts created outside of Azure Virtual Desktop to a host pool. | [Add session hosts](add-session-hosts-host-pool.md?pivots=host-pool-standard) using your preferred method, then use a registration token to add them to a host pool. If you use the Azure portal, you need to input the configuration each time. |
9494
| Configure session hosts | The session host configuration ensures the configuration of session hosts is consistent. | You have to ensure the configuration of session hosts in the host pool is consistent. Session host configuration isn't available. |
95-
| Scale session hosts | Use [autoscale](autoscale-scenarios.md) to turn session hosts on and off based on a schedule and usage. | Use [autoscale](autoscale-scenarios.md) to turn session hosts on and off based on a schedule and usage. |
95+
| Scale session hosts | Use [autoscale](autoscale-scenarios.md) to turn session hosts on and off or create and delete session hosts based on a schedule and usage. | Use [autoscale](autoscale-scenarios.md) to turn session hosts on and off based on a schedule and usage. |
9696
| Update session host image | Use [session host update](session-host-update.md) to update the image and configuration of your session hosts based on the session host management policy and session host configuration. | Use your own existing tools and processes, such as automated pipelines and custom scripts to update the image and configuration of your session hosts. You can't use session host update. |
9797
| Automatically power on session hosts | Use [Start VM on Connect](start-virtual-machine-connect.md) to enable end users to turn on their session hosts only when they need them. | Use [Start VM on Connect](start-virtual-machine-connect.md) to enable end users to turn on their session hosts only when they need them. |
9898

articles/zone-pivot-groups.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,6 +1451,14 @@ groups:
14511451
title: Standard
14521452
- id: host-pool-session-host-configuration
14531453
title: Session host configuration (preview)
1454+
- id: autoscale
1455+
title: Create and assign an autoscale scaling plan
1456+
prompt: "Choose an autoscaling method:"
1457+
pivots:
1458+
- id: power-management
1459+
title: Power management autoscaling
1460+
- id: dynamic
1461+
title: Dynamic autoscaling (preview)
14541462
# Owner: kevinguo-ed
14551463
- id: azure-web-pubsub-create-resource-methods
14561464
title: Create a resource using any one of the methods

0 commit comments

Comments
 (0)