A Few Notes on the Load Balancing Algorithm

Isn’t it nice that we can load balance our vDisks across different servers in PVS and spread the load of connections? But how does load balancing occur and when?

The answer is during target device boot. After the target has acquired an IP address and has downloaded the bootstrap file from TFTP (or Two-Stage Boot in the case of BDM) it makes its first contact with the PVS farm by initiating a connection with the login server listed in the boostrap. After the login server determines the device is present in the database and part of a Device Collection within that farm, it uses a load balancing algorithm to calculate the number of active connections on each PVS server and hands the device over to the least busy one. Not too bad!

There is a subsetting of the load balancing properties on each vDisk that you can tweak from the PVS Console called Subnet Affinity. What Subnet Affinity does is prioritize the servers during load balancing based on the subnet they reside on. You have three configurations for Subnet Affinity at your disposal:

1. None

This one doesn’t take into account subnetting and hands the connection over to the least busy server regardless of network location.

2. Best Effort

Here the PVS server tries extra hard to keep the connection on a server in the same subnet. If not possible, it reaches out to the rest of the hosts in other subnets.

3. Fixed

In “Fixed” the Provisioning Server “forgets” other networks and all connections are handed out to hosts on the same subnet. If no one is available, load balancing doesn’t take place at all.

In Provisioning Services Console you also have the option to rebalance your devices manually or automatically using a pre-set % threshold.

Tip. NEVER use both Subnet Affinity and Auto Rebalance at the same time. Find out why HERE.

 

2 thoughts on “A Few Notes on the Load Balancing Algorithm

  1. Nice Articles. I have a problem with my PVS 7.1 in that certain machines are getting a duplicate Default Gateway once connected to the PVS Server. We have 2 NIC’s and one is dedicated to PVS. This NIC is not supposed to have a default gateway as it messes up the routing table since it is in a different VLAN. VDusk is usually fine with 2 IP addresses if I disable the device in PVS but once enabled the second default gateway comes back. Already checked the DHCP scope options and there is no default gateway for the second NIC.

    David.

    • David,

      This seems to be a known issue addressed in one of the latest hotfixes for PVS 6.1: http://support.citrix.com/article/CTX141654. Since this hotfix chronologically came out after 7.1, chances are the same bug may occur in 7.1 as well. I recommend that you contact Citrix Technical Support and reference defect # LC0688 – they may package the fix in the 7.1/7.6 code and provide you with a private binary or they may determine that it’s a different issue altogether. I hope this helps!

      -Konstantin (The PVS Guy)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s