Configure the Windows Virtual Desktop Preview load-balancing method

Configuring the load-balancing method for a host pool allows you to adjust the Windows Virtual Desktop Preview environment to better suit your needs.

Note

This does not apply to a persistent desktop host pool because users always have a 1:1 mapping to a session host within the host pool.

Configure breadth-first load balancing

Breadth-first load balancing is the default configuration for new non-persistent host pools. Breadth-first load balancing distributes new user sessions across all available session hosts in the host pool. When configuring breadth-first load balancing, you may set a maximum session limit per session host in the host pool.

First, download and import the Windows Virtual Desktop PowerShell module to use in your PowerShell session if you haven't already.

To configure a host pool to perform breadth-first load balancing without adjusting the maximum session limit, run the following PowerShell cmdlet:

Set-RdsHostPool <tenantname> <hostpoolname> -BreadthFirstLoadBalancer

To configure a host pool to perform breadth-first load balancing and to use a new maximum session limit, run the following PowerShell cmdlet:

Set-RdsHostPool <tenantname> <hostpoolname> -BreadthFirstLoadBalancer -MaxSessionLimit ###

Configure depth-first load balancing

Depth-first load balancing distributes new user sessions to an available session host with the highest number of connections but has not reached its maximum session limit threshold. When configuring depth-first load balancing, you must set a maximum session limit per session host in the host pool.

To configure a host pool to perform depth-first load balancing, run the following PowerShell cmdlet:

Set-RdsHostPool <tenantname> <hostpoolname> -DepthFirstLoadBalancer -MaxSessionLimit ###