Network Load Balancing and Terminal Services

Network Load Balancing is used to distribute work between two or more servers. Network Load Balancing represents a group of servers as a single virtual IP address, and provides a mechanism to dynamically distribute load. This is useful in environments where there are a large number of users connecting to a server for a line of business application, or to a database where preserving the session is not critical. Because Terminal Services is unsuitable for clustering, load balancing can often provide a good solution for serving a large group of users.

Traditional load balancing solutions cannot always guarantee that a user will be reconnected to the same server. In cases such as the line of business scenario, there is little or no session specific data to worry about. With more complex desktop deployment or remote access, an enterprise might choose not to support disconnected sessions anyway, to reduce resource requirements and enhance security. Finally, it might be possible to use the attributes of certain types of load balancing to predictably reconnect to the same Terminal server, thus preserving a session.

Preserving a session is not analogous to preserving user data. It is quite possible to manage two or more Terminal servers in a way that allows a user to connect to any server and have appropriate access, simply by storing user data and user profiles external to the Terminal servers. Then the servers need only look to this common store for user profiles and storage. Users have the same experience no matter which server they connect to.

Network Load Balancing provides a good solution for many Terminal servers. Network Load Balancing uses IP affinity, which enables a user with the same IP address to reconnect to the same computer if their session disconnects. This means Network Load Balancing can be used for session recovery if the user has not changed computers. Even if Dynamic Host Configuration Protocol (DHCP) is in use, the user's IP address remains the same as long as he or she does not log off the network in the meantime.

Domain Name System (DNS) is an alternative strategy for load balancing. With round-robin DNS, a single name record resolves to more than one IP address, each with a corresponding cloned server. If you use DNS, disable Session Disconnect on servers running Terminal Services. Because a client could connect to any of the servers, it might connect to a different server than the one on which a disconnected session was left running.

For more information about Network Load Balancing, see "Ensuring the Availability of Applications and Services" in this book.