This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Load balance remote desktop protocol (RDP) 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 graphical user interface 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). In some cases, 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 should 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 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
- 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 backend to avoid flapping between two terminal servers when an RDP session is disconnected without logging out. For more information, see
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 or not 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.
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-->
Note: Repeat the above command to add more services.
> add service ser1 10.102.27.182 RDP 3389 Done > add service ser2 10.102.27.183 RDP 3389 Done >show service ser1 ser1 (10.102. 27.182:3389) - RDP State: UP … Server Name: 10.102.27.182 Server ID : 0 Monitor Threshold : 0 Down state flush: ENABLED … 1) Monitor Name: tcp-default State: UP Weight: 1 … Response Time: 4.152 millisec Done <!--NeedCopy-->
Navigate to Traffic Management > Load Balancing > Services, and create services of type RDP.
At the command prompt, type the following commands to configure an RDP load balancing virtual server and verify the configuration:
add lb vserver <name>@ <serviceType> <ipAddress> <port> bind lb vserver <name>@ <serviceName> Bind all the RDP services to be load balanced to the virtual server. <!--NeedCopy-->
This example has two RDP services bound to the RDP virtual server.
add lb vs v1 rdP 10.102.27.186 3389 Done bind lb vs v1 ser1 service "ser1" bound bind lb vs v1 ser2 service "ser2" bound Done sh lb vs v1 v1 (10.102.27.186:3389) - RDP Type: ADDRESS State: UP … No. of Bound Services : 2 (Total) 2 (Active) Configured Method: LEASTCONNECTION Current Method: Round Robin, Reason: A new service is bound Mode: IP Persistence: NONE L2Conn: OFF 1) ser1 (10.102.27.182: 3389) - RDPState: UP Weight: 1 2) ser2 (10.102.27.183: 3389) - RDPState: UP Weight: 1 Done <!--NeedCopy-->
Navigate to Traffic Management > Load Balancing > Virtual Servers, create a virtual server of type RDP, and bind RDP services to this virtual server.
At the command prompt, type the following commands:
add lb monitor <monitorName> USER -scriptName nsrdp.pl bind lb monitor <monitorName> <rdpServiceName> <!--NeedCopy-->
add service ser1 10.102.27.182 RDP 3389 add lb monitor RDP_MON USER -scriptName nsrdp.pl bind lb monitor RDP_MON ser1 <!--NeedCopy-->
- Navigate to Traffic Management > Load Balancing > Monitors, and create a monitor of type USER.
- In Special Parameters, in the Script Name list, select nsrdp.pl, and then bind this monitor to an RDP service.
In this article
- To configure RDP load balancing services by using the command line interface
- To configure RDP load balancing services by using the configuration utility
- To configure an RDP load balancing virtual server by using the command line interface
- To configure an RDP load balancing virtual server by using the configuration utility
- To configure a scripting monitor for RDP services by using the command line interface
- To configure a scripting monitor for RDP services by using the configuration utility
This Preview product documentation is Citrix Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Citrix Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Citrix product purchase decisions.
If you do not agree, select Do Not Agree to exit.