Q: What is Terminal Services (TS) Session Broker?
Learn more about Session Broker, a Windows Server 2008 role service responsible for balancing the number of sessions on each terminal server that’s part of a farm. It also ensures that when users reconnect to a disconnected session, they're directed back to the terminal server hosting their session.
December 9, 2008
A: Session Broker is a Windows Server 2008 role service responsible for balancing the number of sessions on each terminal server that’s part of a farm. It also ensures that when users reconnect to a disconnected session, they're directed back to the terminal server hosting their session.
Session Broker is designed to deliver a consistent and optimized experience in environments where you have multiple terminal servers to which users may connect. Session Broker saves your users the need to choose between many different terminal servers , which would confuse the users and not balance sessions evenly between servers.
Alternatives to Session Broker include DNS round-robins, which give some balancing between multiple servers. A round-robin isn't able to redirect users back to disconnected sessions, however, and doesn't allow you to "drain" a server like you can with Session Broker. Session Broker allows you to drain a server's connection by preventing it from accepting any new connections, which is useful in preparation for shutting down a server for maintenance.
Session Broker works on the back end. A diagram of its process for reconnecting to a disconnected session is shown here.
A user connects to a terminal server in the farm. The user has an existing disconnected session on Terminal Server 2, but when he reconnects, he initially connects to Terminal Server 1. This initial connection to the farm is typically determined by a DNS round-robin, but could also be determined using a hardware or software load balancer.
Terminal Server 1 queries Session Broker to check if the user has an existing session.
Session Broker responds that the user has a disconnected session on Terminal Server 2.
Terminal server 1 communicates tells the user's RDP client to connect to Terminal Server 2.
The user's RDP client connects to Terminal Server 2.
The user is reconnected to his existing session
The process works in much the same way if the user didn't have an existing session. The terminal server to which the user initially connects queries Session Broker to see which terminal server is best suited to host a new session. Session Broker determines the answer by checking the number of sessions each terminal server currently has and a relative weight value assigned to each terminal server.
You can assign terminal servers in a farm relative weights that specify how many connections different terminal servers should host proportional to one another. For example, if one terminal server has a weight of 100 and another has a weight of 200, then the terminal server with a weight of 200 gets twice as many sessions as the terminal server with a weight of 100.
If you have multiple terminal servers and want to provide a consistent experience for users, you definitely need to deploy Session Broker. Full implementation details for Session Broker are available from Microsoft
About the Author
You May Also Like