You can configure load balancing for RDS hosts by configuring load balancing settings in Horizon Console or by creating and configuring load balancing scripts.
By default, Connection Server uses the following formula to balance the placement of published desktop and application sessions on RDS hosts:
(connected sessions + pending sessions + disconnected sessions)/(maximum session count)
If the maximum session count is configured as unlimited, load balancing falls back to using the absolute number of the total session count which includes connected, pending and disconnected sessions.
- Load Balancing Settings in Horizon Console
- You can configure load balancing settings for a farm in Horizon Console to control the placement of published desktop and application sessions. See, Load Balancing Settings.
- Load Balancing Scripts
-
You can also override the default behavior of the load balancing settings and control the placement of new published desktop and application sessions by writing and configuring load balancing scripts.
You can write your own custom load balancing scripts, or you can use one of the sample load balancing scripts provided with Horizon Agent. To use custom load balancing scripts, you must select the Use Custom Script load balancing setting in Horizon Console.
You can run these scripts on your own schedule or run these scripts with Horizon. For more information on configuring load balancing scripts in Horizon, see Configure a Load Balancing Script on an RDS Host.
Configuring load balancing scripts involves enabling the VMware Horizon View Script Host service and setting a registry key on each RDS host in a farm.
Load balancing scripts must write the load index to the
CustomLoadValue
registry key with theREG_DWORD
registry setting in the following location:HKLM\Sofware\VMware Inc.\VMware VDM\Performance Stats\CustomLoadValue
The value must be between 0-100.
Horizon calculates the raw performance metrics that are written to the
Performance Stats
registry key in the following location:HKLM\Sofware\VMware Inc.\VMware VDM\Performance Stats
You can use the raw performance metrics and combine these with your custom index factor for writing custom scripts.