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
description: How to configure the load-balancing method for an Azure Virtual Desktop environment.
4
-
author: Heidilohr
2
+
title: Configure host pool loadbalancing in Azure Virtual Desktop
3
+
description: How to configure the loadbalancing method for pooled host pools in Azure Virtual Desktop.
4
+
ms.custom: devx-track-azurepowershell
5
5
ms.topic: how-to
6
+
author: sipastak
7
+
ms.author: sipastak
6
8
ms.date: 06/11/2024
7
-
ms.author: helohr
8
-
ms.custom: devx-track-azurepowershell
9
9
---
10
10
11
-
# Host pool load balancing algorithms in Azure Virtual Desktop
11
+
# Configure host pool load balancing in Azure Virtual Desktop
12
12
13
13
Azure Virtual Desktop supports two load balancing algorithms for pooled host pools. Each algorithm determines which session host is used when a user starts a remote session. Load balancing doesn't apply to personal host pools because users always have a 1:1 mapping to a session host within the host pool.
14
14
@@ -18,7 +18,7 @@ The following load balancing algorithms are available for pooled host pools:
18
18
19
19
-**Depth-first**, which keeps starting new user sessions on one session host until the maximum session limit is reached. Once the session limit is reached, any new user connections are directed to the next session host in the host pool until it reaches its session limit, and so on.
20
20
21
-
You can only configure one of the load balancing at a time per pooled host pool, but you can change which one is used after a host pool is created. However, both load balancing algorithms share the following behaviors:
21
+
You can only configure one of the load balancing algorithms at a time per pooled host pool, but you can change which one is used at any time. Both load balancing algorithms share the following behaviors:
22
22
23
23
- If a user already has an active or disconnected session in the host pool and signs in again, the load balancer will successfully redirect them to the session host with their existing session. This behavior applies even if [drain mode](drain-mode.md) has been enabled for that session host.
24
24
@@ -34,16 +34,15 @@ The breadth-first algorithm first queries session hosts in a host pool that allo
34
34
35
35
## Depth-first load balancing algorithm
36
36
37
-
The depth-first load balancing algorithm aims to saturate one session host at a time. This algorithm is ideal for cost-conscious organizations that want more granular control on the number of session hosts available in a host pool, enabling you to more easily scale down when there are fewer users.
37
+
The depth-first load balancing algorithm aims to saturate one session host at a time. This algorithm is ideal for cost-conscious organizations that want more granular control on the number of session hosts available in a host pool, enabling you to more easily scale down the number of session hosts powered on when there are fewer users.
38
38
39
39
The depth-first algorithm first queries session hosts that allow new connections and haven't reached their maximum session limit. The algorithm then selects the session host with most sessions. If there's a tie, the algorithm selects the first session host from the query.
40
40
41
-
You must [set a maximum session limit](configure-host-pool-load-balancing.md#configure-load-balancing) when using the depth-first algorithm. You can use Azure Virtual Desktop Insights to monitor [the number of sessions on each session host](insights-use-cases.md#session-host-utilization) and [session host performance](insights-use-cases.md#session-host-performance) to help determine the best maximum session limit for your environment.
41
+
You must [set a maximum session limit](configure-host-pool-load-balancing.md#configure-load-balancing) when using the depth-first algorithm. You can use Azure Virtual Desktop Insights to [monitor the number of sessions on each session host](insights-use-cases.md#session-host-utilization) and review[session host performance](insights-use-cases.md#session-host-performance) to help determine the best maximum session limit for your environment.
42
42
43
43
> [!IMPORTANT]
44
44
> Once all session hosts have reached the maximum session limit, you need to increase the limit or [add more session hosts to the host pool](add-session-hosts-host-pool.md).
45
45
46
-
47
46
## Prerequisites
48
47
49
48
To configure load balancing for a pooled host pool, you need:
@@ -59,26 +58,23 @@ To configure load balancing for a pooled host pool, you need:
59
58
60
59
### [Azure portal](#tab/portal)
61
60
62
-
To configure load balancing with the Azure portal:
61
+
Here's how to configure load balancing with the Azure portal:
63
62
64
63
1. Sign in to the [Azure portal](https://portal.azure.com).
65
64
66
-
2. Search for and select **Azure Virtual Desktop** under Services.
67
-
68
-
3. In the Azure Virtual Desktop page, select **Host pools**.
65
+
1. In the search bar, enter *Azure Virtual Desktop* and select the matching service entry
69
66
70
-
4. Select the name of the host pool you want to edit.
67
+
1. Select **Host pools**, then select the name of the host pool you want to configure.
71
68
72
-
5. Select **Properties**.
69
+
1. Select **Properties**.
73
70
74
-
6. Enter the **Max session limit** into the field and select the **load balancing algorithm** you want for this host pool in the drop-down menu.
75
-
76
-
7. Select **Save**. This applies the new load balancing settings.
71
+
1. For **Load balancing algorithm**, select which type you want to use for this host pool from the drop-down menu, then for **Max session limit**, enter a value.
77
72
73
+
1. Select **Save** to apply the new load balancing settings.
78
74
79
75
### [Azure PowerShell](#tab/powershell)
80
76
81
-
Here's how to configure load balancing with Azure PowerShell.
77
+
Here's how to configure load balancing with Azure PowerShell:
The output should be similar to the following output:
148
165
149
-
>[!IMPORTANT]
150
-
>When configuring depth-first load balancing, you must set a maximum session limit per session host in the host pool.
166
+
```output
167
+
Name LoadBalancerType MaxSessionLimit
168
+
----------- ------------------ -----------------
169
+
contosohp01 DepthFirst 10
170
+
```
151
171
152
-
>[!NOTE]
153
-
> The depth-first load balancing algorithm distributes sessions to session hosts based on the maximum session host limit (`-MaxSessionLimit`). When you set breadth-first, the parameter's default value is `999999`, which is also the highest possible number you can set this variable to. For the best possible user experience, make sure to change the maximum session host limit parameter to a number that best suits your environment.
172
+
---
154
173
174
+
> [!NOTE]
175
+
> The depth-first load balancing algorithm distributes sessions to session hosts up to the maximum session limit. If you use breadth-first when first creating a host pool, the default value for the maximum session limit is set to `999999`, which is also the highest possible number you can set this parameter to. For the best possible user experience when using depth-first load balancing, make sure to change the maximum session limit parameter to a number that best suits your requirements.
155
176
156
-
## Next steps
177
+
## Related content
157
178
158
-
- Understand how [autoscale](autoscale-scenarios.md) can automatically scale the number of available session hosts in a host pool.
179
+
- Understand how [autoscale](autoscale-scenarios.md) can automatically scale the number of available session hosts in a host pool.
0 commit comments