Load balance remote desktop protocol servers 编辑

Remote Desktop Protocol (RDP) is a multichannel-capable protocol that allows for separate virtual channels for carrying presentation data, serial device communication, licensing information, highly encrypted data (keyboard and mouse activity), and so on.

RDP is used for providing a GUI to another computer on the network. RDP is used with Windows terminal servers for providing fast access with almost real-time transmission of mouse movements and key presses even over low-bandwidth connections.

When multiple terminal servers are deployed to provide remote desktop services, the Citrix ADC appliance provides load balancing of the terminal servers (Windows 2003 and 2008 Server Enterprise Editions). Sometimes, a user who is accessing an application remotely may want to leave the application running on the remote machine but shut down the local machine. The user therefore closes the local application without logging out of the remote application. After reconnecting to the remote machine, the user must be able to continue with the remote application. To provide this functionality, the Citrix ADC RDP implementation honors the routing token (cookie) set by the Terminal Services Session Directory or Broker so that the client can reconnect to the same terminal server to which it was connected previously. The Session Directory, implemented on Windows 2003 Terminal Server, is referred to as Broker on Windows 2008 Terminal Server.

When a TCP connection is established between the client and the load balancing virtual server, the Citrix ADC applies the specified load balancing method and forwards the request to one of the terminal servers. The terminal server checks the session directory to determine whether the client has a session running on any other terminal server in the domain.

If there is no active session on any other terminal server, the terminal server responds by serving the client request, and the Citrix ADC appliance forwards the response to the client.

If there is an active session on any other terminal server, the terminal server that receives the request inserts a cookie (referred to as the routing token) with the details of the active session and returns the packets to the Citrix ADC appliance, which returns the packet to the client. The server closes the connection with the client. When the client retries to connect, the Citrix ADC reads the cookie information and forwards the packet to the terminal server on which the client has an active session.

The user on the client machine experiences a continuation of the service and does not have to take any specific action.

Note: The Windows Session Directory feature requires the Remote Desktop client that was first released with Windows XP. If a session with a Windows 2000 or Windows NT 4.0 Terminal Server client is disconnected and the client reconnects, the server with which the connection is established is selected by the load balancing algorithm.

The following diagram describes RDP load balancing.

Figure 1. Load Balancing Topology for RDP

RDP topology

Note

  • When an RDP service is configured, persistence is automatically maintained by using a routing token. You need not enable persistence explicitly.
  • The Citrix ADC appliance supports only IP-based cookies.
  • The nsrdp.pl script is not supported on any current version of Windows servers.

Ensure that the disconnected RDP sessions are cleared on the terminal servers at the back end to avoid flapping between two terminal servers when an RDP session is disconnected without logging out. For more information, see https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc758177(v=ws.10)#BKMK_2

When you add an RDP service, by default, Citrix ADC adds a monitor of the type TCP and binds it to the service. The default monitor is a simple TCP monitor that checks whether a listening process exists at the 3389 port on the server specified for the RDP service. If there is a listening process at 3389, Citrix ADC marks this service as UP and if there is no listening process, it marks the service as DOWN.

For more efficient monitoring of an RDP service, in addition to the default monitor, you can configure a script monitor that is meant for the RDP protocol. When you configure the scripting monitor, the Citrix ADC opens a TCP connection to the specified server and sends an RDP packet. The monitor marks the service as UP only if it receives a confirmation of the connection from the physical server. Therefore, from the scripting monitor, the Citrix ADC can know whether the RDP service is ready to service a request.

The monitor is a user-type monitor and the script is located on the Citrix ADC at /nsconfig/monitors/nsrdp.pl. When you configure the user monitor, the Citrix ADC runs the script automatically. To configure the scripting monitor, add the monitor and bind it to the RDP service.

To configure RDP load balancing, create services of type RDP and bind them to an RDP virtual server.

To configure RDP load balancing services by using the command line interface

At the command prompt, type the following commands to configure an RDP load balancing setup and verify the configuration:

add service <name>@ <serverName> <serviceType> <port>
<!--NeedCopy-->

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:15 次

字数:5886

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文