Skip to content

Commit ece2a7c

Browse files
authored
Merge pull request #249358 from dknappettmsft/avd-lb-breadth-clarify
AVD load balancing freshness pass and clarified randomization of breadth-first
2 parents 1ce2d08 + 6931a35 commit ece2a7c

File tree

2 files changed

+36
-29
lines changed

2 files changed

+36
-29
lines changed

articles/virtual-desktop/TOC.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@
119119
href: delegated-access-virtual-desktop.md
120120
- name: Azure Virtual Desktop Agent
121121
href: agent-overview.md
122-
- name: Host pool load-balancing methods
122+
- name: Host pool load balancing methods
123123
href: host-pool-load-balancing.md
124+
displayName: load-balancing, lb
124125
- name: FSLogix Profile Container
125126
items:
126127
- name: FSLogix Profile Container and Azure Files
@@ -380,8 +381,8 @@
380381
items:
381382
- name: Customize RDP properties
382383
href: customize-rdp-properties.md
383-
- name: Configure load-balancing method
384-
displayName: load balancing
384+
- name: Configure load balancing method
385+
displayName: load-balancing, lb
385386
href: configure-host-pool-load-balancing.md
386387
- name: Configure personal desktop assignment
387388
displayName: friendly name, reassign, unassign
Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,49 @@
11
---
2-
title: Azure Virtual Desktop host pool load-balancing - Azure
3-
description: Learn about host pool load-balancing algorithms for a Azure Virtual Desktop environment.
4-
author: Heidilohr
2+
title: Host pool load balancing algorithms in Azure Virtual Desktop - Azure
3+
description: Learn about the host pool load balancing algorithms available for pooled host pools in Azure Virtual Desktop.
4+
author: dknappettmsft
55
ms.topic: conceptual
6-
ms.date: 09/19/2022
7-
ms.author: helohr
8-
manager: femila
6+
ms.date: 08/25/2023
7+
ms.author: daknappe
98
---
10-
# Host pool load-balancing algorithms
119

12-
>[!IMPORTANT]
13-
>This content applies to Azure Virtual Desktop with Azure Resource Manager Azure Virtual Desktop objects. If you're using Azure Virtual Desktop (classic) without Azure Resource Manager objects, see [this article](./virtual-desktop-fall-2019/host-pool-load-balancing-2019.md).
10+
# Host pool load balancing algorithms in Azure Virtual Desktop
1411

15-
Azure Virtual Desktop supports two load-balancing algorithms. Each algorithm determines which session host will host a user's session when they connect to a resource in a pooled host pool. The information in this article only applies to pooled host pools.
12+
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.
1613

17-
The following load-balancing algorithms are available in Azure Virtual Desktop:
14+
The following load balancing algorithms are available for pooled host pools:
1815

19-
- Breadth-first load balancing allows you to evenly distribute user sessions across the session hosts in a host pool. You don't have to specify a maximum session limit for the number of sessions.
20-
- Depth-first load balancing allows you to saturate a session host with user sessions in a host pool. You have to specify a maximum session limit for the number of sessions. Once the first session host reaches its session limit threshold, the load balancer directs any new user connections to the next session host in the host pool until it reaches its limit, and so on.
16+
- **Breadth-first**, which aims to evenly distribute new user sessions across the session hosts in a host pool. You don't have to specify a maximum session limit for the number of sessions.
2117

22-
Each host pool can only configure one type of load-balancing specific to it. However, both load-balancing algorithms share the following behaviors no matter which host pool they're in:
18+
- **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.
2319

24-
- 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 that session host's AllowNewConnections property is set to False (drain mode is enabled).
25-
- If a user doesn't already have a session in the host pool, then the load balancer won't consider session hosts whose AllowNewConnections property is set to False during load balancing.
26-
- If you lower the maximum session limit on a session host while it has active user sessions, the change won't affect the active user sessions.
20+
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:
2721

28-
## Breadth-first load-balancing algorithm
22+
- 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.
2923

30-
The breadth-first load-balancing algorithm allows you to distribute user sessions across session hosts to optimize for session performance. This algorithm is ideal for organizations that want to provide the best experience for users connecting to their pooled virtual desktop environment.
24+
- If a user doesn't already have a session on a session host in the host pool, the load balancer doesn't consider a session host where drain mode has been enabled.
3125

32-
The breadth-first algorithm first queries session hosts that allow new connections. The algorithm then selects a session host randomly from half the set of session hosts with the least number of sessions. For example, if there are nine machines with 11, 12, 13, 14, 15, 16, 17, 18, and 19 sessions, a new session you create won't automatically go to the first machine. Instead, it can go to any of the first five machines with the lowest number of sessions (11, 12, 13, 14, 15).
26+
- If you lower the maximum session limit on a session host while it has active user sessions, the change doesn't affect existing user sessions.
3327

34-
## Depth-first load-balancing algorithm
28+
## Breadth-first load balancing algorithm
3529

36-
The depth-first load-balancing algorithm allows you to saturate one session host at a time to optimize for scale down scenarios. This algorithm is ideal for cost-conscious organizations that want more granular control on the number of virtual machines they've allocated for a host pool.
30+
The breadth-first load balancing algorithm aims to distribute user sessions across session hosts to optimize for session performance. Breadth-first is ideal for organizations that want to provide the best experience for users connecting to their remote resources as session host resources, such as CPU, memory, and disk, are generally less contended.
3731

38-
The depth-first algorithm first queries session hosts that allow new connections and haven't gone over their maximum session limit. The algorithm then selects the session host with highest number of sessions. If there's a tie, the algorithm selects the first session host in the query.
32+
The breadth-first algorithm first queries session hosts in a host pool that allow new connections. The algorithm then selects a session host randomly from half the set of available session hosts with the fewest sessions. For example, if there are nine session hosts with 11, 12, 13, 14, 15, 16, 17, 18, and 19 sessions, a new session doesn't automatically go to the session host with the fewest sessions. Instead, it can go to any of the first five session hosts with the fewest sessions at random. Due to the randomization, some sessions may not be evenly distributed across all session hosts.
33+
34+
## Depth-first load balancing algorithm
35+
36+
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+
38+
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.
39+
40+
You must [set a maximum session limit](configure-host-pool-load-balancing.md#configure-depth-first-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.
3941

4042
> [!IMPORTANT]
41-
> The maximum session limit parameter is required when you use the depth-first load balancing algorithm. For the best possible user experience, make sure to change the maximum session host limit parameter to a number that best suits your environment.
42-
>
43-
> Once all session hosts have reached the maximum session limit, you will need to increase the limit or deploy more session hosts.
43+
> 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).
44+
45+
## Next steps
46+
47+
- Learn how to [configure load balancing for a host pool](configure-host-pool-load-balancing.md).
48+
49+
- Understand how [autoscale](autoscale-scenarios.md) can automatically scale the number of available session hosts in a host pool.

0 commit comments

Comments
 (0)