Let's assume you both a head office and one or more branch offices. Let's also assume that you want your clients to connect to the local servers when possible, and if the local servers are unavailable, then connect to the head office servers. In the example below, we have a head office and a branch office. Clients in the branch office use the 192.168.1.0/24 subnet and clients in the head office use the 192.168.0.0/24 subnet.
We created a worker group for each site in XenApp, these are based on Active Directory organisational units, but you can base the worker groups on other criteria if preferred.
Then we need to create two load balancing policies, one for the head office and one for the branch office. Each load balancing policy should use the client IP address filter and the Worker Group preference policy, see below: