You can write a load balancing script to generate a load value based on any RDS host metric that you want to use for load balancing. You can also write a simple load balancing script that returns a fixed load value.
Your load balancing script must return a single number from 0 to 3. For descriptions of the valid load values, see Load Values and Mapped Load Preferences.
If at least one RDS host in the farm returns a valid load value, View Connection Server assumes a load value of 2 (mapped load preference of MED) for the other RDS hosts in farm until their load balancing scripts return valid values. If no RDS host in the farm returns a valid load value, the load balancing feature is disabled for the farm.
If your load balancing script returns an invalid load value or does not finish running within 10 seconds, View Agent sets the load preference to BLOCK and the RDS host state to configuration error. These values effectively remove the RDS host from the list of RDS hosts available for new sessions.
Copy your load balancing script to the View Agent scripts directory (C:\Program Files\VMware\VMware View\Agent\scripts) on each RDS host in the farm. You must copy the same script to every RDS host in the farm.
For an example how to write a load balancing script, see the sample scripts in the View Agent scripts directory. For more information, see Sample Load Balancing Scripts for RDS Hosts.