TS Session Broker
Updated: January 21, 2008
Applies To: Windows Server 2008
Terminal Services Session Broker (TS Session Broker) is a role service in the Windows Server® 2008 operating system that supports session load balancing between terminal servers in a farm, and reconnection to an existing session in a load-balanced terminal server farm. TS Session Broker stores session state information that includes session IDs and their associated user names, and the name of the server where each session resides.
Windows Server 2008 introduces the TS Session Broker Load Balancing feature. This feature enables you to distribute the session load between servers in a load-balanced terminal server farm.
|In Windows Server 2008, the name of the Terminal Services Session Directory feature was changed to Terminal Services Session Broker (TS Session Broker).|
In Windows Server 2008, TS Session Broker is available in the Windows Server 2008 Standard operating system, as well as the Windows Server 2008 Enterprise and Windows Server 2008 Datacenter operating systems. To use Terminal Services Session Directory in Windows Server® 2003, terminal servers had to be running at least Windows Server 2003 Enterprise Edition.
To participate in TS Session Broker Load Balancing, the TS Session Broker server and the terminal servers in the farm must be running Windows Server 2008. Windows Server 2003-based terminal servers cannot use the TS Session Broker Load Balancing feature.
For clients to use TS Session Broker Load Balancing, they must be running Remote Desktop Connection (RDC) version 5.2 or later.
The new TS Session Broker Load Balancing feature enables you to evenly distribute the session load between servers in a load-balanced terminal server farm. With TS Session Broker Load Balancing, new user sessions are redirected to the terminal server with the fewest sessions.
Using TS Session Broker to load balance sessions involves two phases. In the first phase, initial connections are distributed by a preliminary load-balancing mechanism, such as Domain Name System (DNS) round robin. After a user authenticates, the terminal server that accepted the initial connection queries the TS Session Broker server to determine where to redirect the user.
In the second phase, the terminal server where the initial connection was made redirects the user to the terminal server that was specified by TS Session Broker. The redirection behavior is as follows:
A user with an existing session will connect to the server where their session exists.
A user without an existing session will connect to the terminal server that has the fewest sessions.
|While any load-balancing mechanism can be used to distribute the initial connections, DNS round robin is the easiest mechanism to deploy. Deploying TS Session Broker Load Balancing with a network level load-balancing solution such as Windows Network Load Balancing (NLB) or a hardware load balancer avoids the limitations of DNS, while still taking advantage of TS Session Broker session-based load balancing, the per-server limit on the number of pending logon requests, and the user logon mode setting. (The limitations of DNS round robin include the caching of DNS requests on the client, which can result in clients using the same IP address for each initial connection request, and the potential for a 30-second timeout delay if a user is redirected to a terminal server that is offline, but still listed in DNS.)|
TS Session Broker Load Balancing sets a limit of 16 for the maximum number of pending logon requests to a particular terminal server. This helps to prevent the scenario where a single server is overwhelmed by new logon requests; for example, if you add a new server to the farm, or if you enable user logons on a server where they were previously denied.
The TS Session Broker Load Balancing feature also enables you to assign a relative weight value to each server. By assigning a server weight value, you can help to distribute the load between more powerful and less powerful servers in the farm.
|To configure a server to participate in TS Session Broker Load Balancing, and to assign a server weight value, you can use the Terminal Services Configuration tool.|
Additionally, a user logon mode setting is provided that enables you to prevent new users from logging on to a terminal server that is scheduled to be taken down for maintenance. This mechanism provides for the ability to take a server offline without disrupting the user experience. If new logons are denied on a terminal server in the farm, TS Session Broker will allow users with existing sessions to reconnect, but will redirect new users to terminal servers that are configured to allow new logons.
|The User logon mode setting is located under General in the Edit settings area of the Terminal Services Configuration tool.|
If you want to use the TS Session Broker Load Balancing feature, both the TS Session Broker server and the terminal servers in the same farm must be running Windows Server 2008.
If you want to use DNS round-robin as the load balancer for initial connections, you must create a host resource record for each terminal server in the farm that maps to the terminal server farm name in DNS. (The farm name is the virtual name that clients will use to connect to the terminal server farm.) DNS uses round robin to rotate the order of the resource records that are returned to the client. This functionality helps to distribute initial connections across servers in the farm.
|If you prefer, you can use a hardware load balancer to spread the initial connection and authentication load between multiple terminal servers in the farm.|
The following Group Policy setting has been added for TS Session Broker:
Computer Configuration\Administrative Templates\Windows Components\Terminal Services\Terminal Server\TS Session Broker\Use TS Session Broker load balancing
The possible values are:
Enabled: If you enable this policy setting, TS Session Broker will redirect users who do not have an existing session to the terminal server in the farm with the fewest sessions. Redirection behavior for users with existing sessions will not be affected. If the server is configured to use TS Session Broker, users who have an existing session will be redirected to the terminal server where their session exists.
Disabled: If you disable this policy setting, users who do not have an existing session will log on to the terminal server that they first connect to.
Not configured: If you do not configure this policy setting, TS Session Broker Load Balancing is not specified at the Group Policy level. In this case, you can configure the terminal server to participate in TS Session Broker Load Balancing by using the Terminal Services Configuration tool or the Terminal Services WMI provider. By default, this policy setting is not configured.