Citrix Virtual Apps and Desktops

Load balance machines

Load balancing helps organizations achieve the cost balance they want while being able to take advantage of all the cloud has to offer. Load balancing is configured at the delivery group level.

Note:

Load balancing applies only to multi-session OS machines.

Load balancing has two options:

  • Horizontal load balancing
  • Vertical load balancing

By default, horizontal load balancing is enabled.

Horizontal load balancing: In the horizontal load balancing model, the incoming user session is assigned to the least-loaded machine available. Consider this example, in a deployment, let’s assume we have two VDAs. One has an active user session (User 1), and the second user (User 2) is waiting for a session. The horizontal load balancing algorithm assigns User 2 to VDA 2 because of the more favorable load index. Thus, the horizontal algorithm distributes sessions across all available VDAs, which might hinder machines from turning off when the load decreases.

Vertical load balancing: In the vertical load balancing model, the sessions are assigned to the VDAs with the highest load index. This helps consolidate the incoming user sessions to VDAs that are already being used by other users and helps to reduce the number of VDAs that must be powered on and kept ready for user sessions. Let’s consider the same deployment as the one mentioned in the horizontal load balancing. User 1 is assigned to VDA 1, and the vertical load balancing algorithm is applied to the User 2 session. User 2 is assigned to VDA 1 because the higher load index is on VDA 1. Therefore, all incoming sessions are assigned to the most-loaded VDA until the high load index watermark is met. Only then, the other VDA starts receiving sessions.

Load balancing setting at site level

You can configure load balancing for all delivery groups (site-wide setting).

To configure this feature from Studio, select Settings in the left pane. Select an option under Load Balancing Sessions on Machines.

Alternatively, you can use PowerShell to enable or disable vertical load balancing site-wide. Use the UseVerticalScalingForRdsLaunches setting in the Set-BrokerSite cmdlet. Use Get-BrokerSite to display the value of the UseVerticalScalingForRdsLaunches setting. See the cmdlet help for details.

Tip:

To specify the maximum number of sessions a machine can host, use the Maximum number of sessions policy setting.

Load balancing setting at delivery group level

You can configure load balancing at the delivery group level and override the load balancing setting inherited from the site level.

You can configure this during creating a delivery group or editing an existing delivery group. See Step 2. Load balancing.

Load management

Load management measures the server load and determines which server to select under the current environment conditions. This selection is based on:

  • Server maintenance mode status: A multi-session OS machine is considered for load balancing only when maintenance mode is off.
  • Server load index: Determines how likely a server delivering multi-session OS machines is to receive connections. The index is a combination of load evaluators: the number of sessions and the settings for performance metrics such as CPU, disk, and memory use. Load evaluators are specified in load management policy settings. By default, the load index only uses the number of sessions in its calculation, and not CPU, disk, or memory until they are configured in load management policy settings. For information on policy settings, see Load management policy settings.

    A server load index of 10000 indicates that the server is fully loaded. If no other servers are available, users might receive a message that the desktop or application is currently unavailable when they launch a session. You can monitor the load index in Director (Monitor), a Studio search, and the SDK.

    In console displays, to display the Server Load Index column (which is hidden by default), select a machine, right-click a column header, and then select Select Column. In the Machine category, select Load Index.

    In the SDK, use the Get-BrokerMachine cmdlet. For details, see CTX202150.

  • Concurrent logon tolerance policy setting: The maximum number of concurrent requests to log on to the server. (This setting is equivalent to load throttling in XenApp 6.x versions.)

    When all servers are at or higher than the concurrent logon tolerance setting, the next logon request is assigned to the server with the lowest pending logons. If more than one server meets these criteria, the server with the lowest load index is selected. See Concurrent logon tolerance.

    Tip:

    To enforce the logon tolerance setting and cause concurrent logons that exceed the specified number to fail, you can run Set-BrokerServiceConfigurationData Core.LogonToleranceIsHardLimit -SettingValue $true.

Load balance machines