Load balancing a Citrix StoreFront

This is well-documented by Citrix too; I just thought I’d write a few lines on a gotcha I happened upon:
Load balancing the Citrix StoreFront has two prerequisites:

  1. The StoreFront servers must see the load balancer VIP when looking up the service FQDN.
  2. The load balancers must be configured with session affinity, since it doesn’t seem as though StoreFront keeps track of user sessions between StoreFront servers.

In addition, Citrix recommends running a load balancing scheme based on least connections.

In HAProxy, a valid backend config looks something like this: