Load Balancing Terminal Services

Terminal Services is one of the components of Microsoft Windows that allows a user to access applications and data on a remote computer over a network. Terminal services is Microsoft's implementation of thin–client terminal server computing, where Windows applications, or even the entire desktop of the computer running terminal services, are made accessible to a remote client machine.

The load balancer is deployed in front of the Terminal Servers to provide load balancing and fail–over functionality. Clients then connect to a Virtual Service (VIP) on the load balancer rather than connecting directly to a one of the Terminal Servers. These connections are then load balanced between the associated Terminal Servers to distribute the load according to the load balancing algorithm selected.

We've been using our Enterprise Clustered Pair to run a Microsoft Remote Desktop Services farm for 4 years with no problems.
Matthew Abrahams - All3Media

An important aspect of load balancing Terminal Services is persistence. This relates to the ability to reconnect to disconnected sessions that occur when client sessions are closed rather than logged off. If this reconnection process is not handled correctly, users may not be able to return to their previous sessions. The following persistence methods are available:

IP Persistence
This is our recommended method and can be used in most cases. It does rely on each client having a unique IP address, so if clients connect via some form of NAT device, this may not work (since the source IP address for all clients may be the same).

Microsoft Session Directory / Connection Broker
Connection Broker provides functionality that allows a group of Terminal Servers to coordinate the reconnection of disconnected sessions. All sessions are stored as records in a central database. This database is updated and queried by the Terminal Servers whenever users log on, log off, or disconnect their session while leaving their applications active.

The load balancer is able to interact with Connection Broker by enabling Routing Token Redirection mode. This mode allows the reconnection of disconnected sessions by utilizing a routing token to enable the load balancer to re-connect the client to the correct Server.

RDP Cookies
This method utilizes the cookie sent from the client in the initial Connection Request PDU. This cookie is created when the username is entered at the first client login prompt (mstsc.exe). If the username is not entered here, the cookie is not created. NOTE: This method is not generally recommended. Please refer to this blog post for further information.




Please refer to our Microsoft Terminal Services Deployment Guide for further information.

Note:
Please refer to our Microsoft Remote Desktop Services Deployment Guide if you're load balancing Remote Desktop Services.

The entire Loadbalancer.org ENTERPRISE product range supports load balancing Microsoft Terminal Services and Remote Desktop Services and starts from as little as $1,495