Load Balancing Microsoft Terminal Services
- Last Updated: October 8, 2024
- 2 minute read
- LoadMaster
- LoadMaster GA
- Documentation
Setting up a Virtual Service to balance Microsoft Terminal Servers is very similar to setting up any other Virtual Service. The system tries to automatically detect the type of Virtual Service based on the port of the Virtual Service.If the Virtual Service uses port 80, 8080 or 443, then it will be configured as a HTTP/HTTPS service. If it uses port 3389 then it will be configured for terminal services. If the port is set to anything else, the service will be configured as “Generic”.
This configuration is intended to allow the LoadMaster to balance Microsoft Terminal Services across multiple servers. Upon first connection, a server is allocated using the standard scheduling methods, i.e. Round Robin, Least Connection, Adaptive, etc.
If a user disconnects from his/her session without logging out, it is preferable to maintain persistence with the server that he/she originally connected to. This allows that user to come back to the screen they were working on, with all the same windows open and applications running where they had left off.
This is where the Persistence Mode of Terminal Service comes in. If this persistence mode is enabled, when a user reconnects, the LoadMaster will try to connect the session to the same server. It does this in one of three ways:
If the terminal servers support a RD Connection Broker, the LoadMaster will use the "routing token" supplied by the RD Connection Broker to determine the correct host to connect to. The LoadMaster persistency timeout value is irrelevant here - it is a feature of the RD Connection Broker.
Using RD Connection Broker with the LoadMaster is optional in terms of persistence. If the client pre-populates the username and password fields in the initial request, then this value is stored on the LoadMaster. As long as these fields are still populated upon reconnect, the LoadMaster will look up the name and reconnect to the same server as the original connection. The persistence timeout is used to limit the time the information is kept on the LoadMaster.
If using Terminal-Service or source IP mode, then if neither of these two modes succeeds, the source IP address will be used for persistency.