Configure load balancing in an existing deployment 编辑

Configure load balancing in an existing deployment

You can add load balancing nodes using Citrix ADC in an existing Session Recording deployment. The following servers are used as an example. You can also deploy and load-balance Session Recording in Azure.

  • Session Recording

    Host NameServer RoleOSIP Address
    SRServer1Session Recording ServerWindows Server10.63.32.55
    LBDCDomain controllerWindows Server10.63.32.82
    TSVDASession Recording AgentWindows Server10.63.32.215
    SRSQLSession Recording database and the file serverWindows Server10.63.32.91

    All Session Recording components and the domain controller share a domain, for example, lb.com. The domain administrator account, for example, lb\administrator, is used for server logon.

  • Citrix ADC

    Host NameServer RoleManagement IP Address (NSIP)Subnet IP Address (SNIP)
    NetscalerCitrix ADC VPX instance10.63.32.4010.63.32.109

    For more information, see Deploy a Citrix ADC VPX instance.

Step 1: Create shared folders on the file server

  1. Log on to the file server by using a domain administrator account, for example, lb\administrator.

  2. Create a folder to store recordings and name the folder SessionRecording, for example, C:\SessionRecording. Share the Read/Write permission of the folder with a Session Recording server. Using SRServer1 as an example, type LB\SRSERVER1$. The dollar sign $ is required.

    Sharing permissions of a folder

    Sharing permissions of a folder to a target server

  3. Create a subfolder within the SessionRecording folder and name the subfolder share, for example, C:\SessionRecording\share.

    Sharing permissions of a folder

  4. Create another folder to restore archived recordings and name the folder SessionRecordingsRestored, for example, C:\ SessionRecordingsRestored. Share the Read/Write permission of the folder with a Session Recording server. Using SRServer1 as an example, type LB\SRSERVER1$. The dollar sign $ is required.

  5. Create a subfolder within the SessionRecordingsRestored folder and name the subfolder share, for example, C:\ SessionRecordingsRestored\share.

Step 2: Configure an existing Session Recording server to support load balancing

This step describes how to configure an existing Session Recording server to support load balancing. Step 7 details the procedure of adding more Session Recording servers to your existing deployment.

  1. Log on to a Session Recording server by using a domain administrator account.

  2. Open Session Recording Server Properties.

    Session Recording Server Properties

  3. Add the Universal Naming Convention (UNC) paths created in Step 1 to store and restore recording files, in this example, \\SRSQL\SessionRecording\share and \\SRSQL\SessionRecordingRestored\share. SRSQL is the host name of the file server.

    Note:

    The Session Recording player cannot play files under a path that contains a drive letter or a dollar sign ($). The exception is that you install the player and the Session Recording server on the same machine.

    Add UNC paths

  4. Add a value to the Session Recording server registry key at HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\SmartAuditor\Server.

    Value name: EnableLB
    Value data: 1 (D_WORD, meaning enable)

    Add a registry key value

  5. Restart the Citrix Session Recording Storage Manager service.

Step 3: Configure load balancing in Citrix ADC

There are two ways to configure load balancing in Citrix ADC - TCP passthrough and SSL offloading.

Configure load balancing through TCP passthrough

The following topologies show how to configure load balancing through TCP passthrough.

  • If you are using the Python-based WebSocket server (Version 1.0):

    Configure load balancing through TCP passthrough

  • If you are using the WebSocket server hosted in IIS (Version 2.0):

    Configure load balancing through TCP passthrough

To configure load balancing through TCP passthrough, complete the followings steps:

  1. Log on to your Citrix ADC VPX instance.

  2. Navigate to Configuration > System > Settings > Configure Basic Features.

    Configure Basic Features

  3. Select Load Balancing and click OK.

    Select Load Balancing

  4. Add load balancing servers.

    Navigate to Traffic Management > Load Balancing > Servers and click Add.

    Add load balancing servers

    Type the name and IP address of a Session Recording server and then click Create. For example:

    Create a load-balancing server

    Click the save icon in the upper right corner to save your changes.

    Click save

  5. For WebSocket server Version 1.0, add load balancing services of ports 80, 1801, 22334, and 443 for each Session Recording server. For WebSocket server Version 2.0, add load balancing services of ports 80, 1801, and 443 for each Session Recording server.

    Navigate to Traffic Management > Load Balancing > Services and click Add.

    Add load balancing services

    Type a name for each load balancing service that you add. Choose Existing Server, select the IP address of your target Session Recording server, select TCP as the server protocol, and type a port number. Click OK.

    Create a load balancing service

    Bind the TCP protocol monitor to each load balancing service.

    Bind the TCP protocol monitor

    Click the save icon in the upper right corner to save your changes.

    Save created services

    Tip:

    The load balancing service of port 22334 is required only for WebSocket server Version 1.0.

  6. Add load balancing virtual servers.

    For WebSocket server Version 1.0, complete the following steps to add load balancing virtual servers of ports 80, 443, 1801, and 22334. For WebSocket server Version 2.0, add load balancing virtual servers of ports 80, 443, and 1801. For example:

    Save virtual servers

    Navigate to Traffic Management > Load Balancing > Virtual Servers and click Add.

    Add virtual servers

    Add each virtual server with the Citrix ADC VIP address based on the TCP protocol.

    Load balancing virtual server

    Bind each virtual server to the load balancing service of the same port. For example:

    Load balancing virtual server service binding

    Add a virtual server service binding

    Choose a load balancing method.

    Choose a load-balancing method

    Configure persistence on each virtual server. We recommend you select SOURCEIP as the persistence type. For more information, see Persistence settings.

    Configure persistence

  7. Create a host record for the Citrix ADC VIP address on the domain controller.

    Create a host record

  8. To access the web player over HTTPS, ensure that a SAN certificate is available both on Citrix ADC and on each Session Recording server. A SAN certificate contains the FQDNs of the Citrix ADC and of each Session Recording server.

    SAN certificate

Configure load balancing through SSL offloading

The following topologies show how to configure load balancing through SSL offloading.

  • If you are using the Python-based WebSocket server (Version 1.0):

    Configure load balancing through SSL offloading

  • If you are using the WebSocket server hosted in IIS (Version 2.0):

    Configure load balancing through SSL offloading

  1. Log on to your Citrix ADC VPX instance.

  2. Navigate to Configuration > System > Settings > Configure Basic Features.

    Configure Basic Features

  3. Select SSL Offloading and Load Balancing and click OK.

    Select SSL Offloading and Load Balancing

  4. Add load balancing servers.

    Navigate to Traffic Management > Load Balancing > Servers and click Add.

    Add load balancing servers

    Type the name and IP address of a Session Recording server and then click Create. For example:

    Create a load-balancing server

    Click the save icon in the upper right corner to save your changes.

    Click save

  5. Add load balancing services for each Session Recording server that you added in the previous step.

    Add the following load balancing services for each Session Recording server:

    • (Required only when you are using the WebSocket server Version 1.0) SSL load balancing service of port 22334 that binds to the TCP monitor
    • SSL load balancing service of port 443 that binds to the HTTPS monitor
    • TCP load balancing service of port 1801 that binds to the TCP monitor

    For example:

    Load balancing services for a server

    Navigate to Traffic Management > Load Balancing > Services and click Add.

    Add load balancing services

    (Required only when you are using the WebSocket server Version 1.0) Add an SSL load balancing service of port 22334 for each Session Recording Server. Type a name for the load balancing service, choose Existing Server, select the IP address of a Session Recording server, select SSL as the server protocol, type port number 22334, and click OK.

    For example, see the following screen capture.

    Create an SSL load-balancing service of port 22334

    Bind the TCP monitor to the SSL load balancing service you just added.

    Bind the TCP protocol monitor to the SSL load-balancing service of port 22334

    Add an SSL load balancing service of port 443 for each Session Recording Server. Type a name for the load balancing service, choose Existing Server, select the IP address of a Session Recording server, select SSL as the server protocol, type port number 443, and click OK.

    Create an SSL load-balancing service of port 443

    Bind the HTTPS monitor to the SSL load balancing service you just added.

    Bind the HTTPS protocol monitor to the SSL load-balancing service of port 443

    Add a TCP load balancing service of port 1801 for each Session Recording Server. Type a name for the load balancing service, choose Existing Server, select the IP address of a Session Recording server, select TCP as the server protocol, type port number 1801, and click OK.

    Create an SSL load-balancing service of port 1801

    Bind the TCP monitor to the TCP load balancing service you just added.

    Bind the TCP protocol monitor to the SSL load-balancing service of port 1801

  6. (Required only when you are using the WebSocket server Version 1.0) Add an HTTP profile for each SSL load balancing service of port 22334.

    Navigate to System > Profiles > HTTP Profiles and click Add.

    Add HTTP profiles

    Select the Enable WebSocket connections check box and accept the other default settings.

    Enable WebSocket connections

    Type a name for the HTTP profile, for example, websocket_SSL.

    Go back to each SSL load balancing service of port 22334, for example, srv-1-22334. Click + Profiles.

    Add profiles

    Select the HTTP profile, for example, websocket_SSL, and click OK and then Done.

    Select a profile to add

  7. (Required only when you are using the WebSocket server Version 2.0) Add an HTTP profile for each SSL load balancing service of port 443.

  8. Create a host record for the Citrix ADC VIP address on the domain controller.

    Create a host record

  9. Add load balancing virtual servers.

    Add the following load balancing virtual servers with the Citrix ADC VIP address.

    • (Required only when you are using the WebSocket server Version 1.0) load balancing virtual server of port 22334 based on SSL
    • load balancing virtual server of port 443 based on SSL
    • load balancing virtual server of port 1801 based on TCP

    For example, see the following screen capture.

    Load balancing virtual servers of three port numbers

    Navigate to Traffic Management > Load Balancing > Virtual Servers and click Add.

    Add virtual servers

    Add each virtual server with the Citrix ADC VIP address. Type a server name, select TCP or SSL, and select the relevant port number as described earlier.

    Virtual server of port 80

    Bind each virtual server to the load balancing service of the same port. For example:

    Bind to the load-balancing service of the same port

    Tip:

    The load balancing service of port 22334 is required only when you are using the WebSocket server Version 1.0.

    Choose a load balancing method.

    Load balancing method

    Configure persistence on each virtual server. We recommend you select SOURCEIP as the persistence type. For more information, see Persistence settings.

    Configure persistence

    (Required only when you are using the WebSocket server Version 1.0) Add an HTTP profile for the load balancing virtual server of port 22334.

    Add an HTTP profile for the load balancing virtual server of port 22334

  10. Install a Subject Alternative Name (SAN) certificate in Citrix ADC.

    Obtain a SAN certificate in PEM format from a trusted Certificate Authority (CA). Extract and upload the certificate and private key files in Citrix ADC by navigating to Traffic Management > SSL > Server Certificate Wizard.

    For more information, see SSL certificates.

    Install a certificate

  11. Bind a SAN certificate to each SSL load balancing virtual server.

    Navigate to Traffic Management > Load Balancing > Virtual Servers, select an SSL load balancing virtual server, and click Server Certificate.

    Server certificate

    Add the previously mentioned SAN certificate and click Bind.

Step 4: Configure an existing Session Recording Agent to support load balancing

  1. Log on to the Session Recording Agent by using a domain administrator account.

  2. Open Session Recording Agent Properties.

  3. Complete this step if you use Microsoft Message Queuing (MSMQ) over TCP.

    Type the FQDN of your Citrix ADC VIP address in the Session Recording Server box.

    Session Recording Server box

    On each Session Recording server, add and set the IgnoreOSNameValidation DWORD value to 1 under HKEY_LOCAL_MACHINE\ SOFTWARE\Microsoft\MSMQ\Parameters. For more information, see Knowledge Center article CTX248554.

  4. Complete this step if you use MSMQ over HTTP or HTTPS.

    (Skip if this step is done) Create a host record for the Citrix ADC VIP address on the domain controller.

    Create a host record for the Citrix ADC VIP address

    On each Session Recording server, run the powershell.exe -file SrServerConfigurationSync.ps1 –Action AddRedirection – ADCHost <ADCHost> command to add redirections from Citrix ADC to the local host. <ADCHost> is the FQDN of the Citrix ADC VIP address. A redirection file, for example, sr_lb_map.xml is generated under C:\Windows\System32\msmq\Mapping.

    Add redirections

    Note: Change to the folder where SrServerConfigurationSync.ps1 resides when you run PowerShell.exe.

    Type the FQDN of your Citrix ADC VIP address in the Session Recording Server box. For example:

    Type the FQDN of your Citrix ADC VIP address

Step 5: Configure an existing Session Recording player to support load balancing

On each machine where you installed the Session Recording player component, add the Citrix ADC VIP address or its FQDN as the connected Session Recording server.

Step 6: Check whether load balancing works for the configured, existing Session Recording server

  1. Launch a Citrix virtual session.
  2. Check whether the session can be recorded.
  3. Check whether the web player and the Session Recording player can play back the recording file.

Step 7: Add more Session Recording servers

  1. Prepare a machine in the same domain and install only the Session Recording server and Session Recording Administrator Logging modules on the machine.

    Install only the Session Recording server and Session Recording Administrator Logging modules

  2. Use the same database names as the existing Session Recording server. For example:

    Use the same database names

  3. Disable the network firewall on the machine.

  4. On the SQL Server where you installed the Session Recording database, add all the Session Recording server machine accounts to the shared Session Recording database and assign them with the db_owner permission. For example:

    Add all the Session Recording server machine accounts to the shared Session Recording database

    Assign a database permission

  5. Share the Read/Write permission of the recording storage and restore folders, for example, SessionRecording and SessionRecordingsRestored, with the machine account of the new Session Recording server, for example, LB\SRServer2$. The dollar sign $ is required.

  6. Repeat Step 3 to add load balancing services for the new Session Recording server and edit existing virtual servers to add bindings to the load balancing services. There is no need to add more virtual servers. For example:

    A new Session Recording server

    Add load-balancing services for a new Session Recording server

    Edit virtual servers

    Virtual server service binding

  7. Copy the Session Recording Authorization Console configuration file, SessionRecordingAzManStore.xml, from the existing Session Recording server to the new Session Recording server. The file lives in <Session Recording Server installation path>\App_Data.

  8. To use MSMQ over HTTP or HTTPS for the new Session Recording server, complete the following steps to import the registry settings of the currently functioning Session Recording server.

    On the existing Session Recording server, for example, SRServer1, run the powershell.exe -file SrServerConfigurationSync.ps1 –Action Export – ADCHost <ADCHost > command, where <ADCHost> is the FQDN of the Citrix ADC VIP address. An exported registry file, SrServerConfig.reg, is generated.

    Copy the SrServerConfig.reg file to the new Session Recording server and run the powershell.exe -file SrServerConfigurationSync.ps1 –Action Import,AddRedirection – ADCHost <ADCHost> command. The EnableLB value is added to the registry key of the new Session Recording Server at HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\SmartAuditor\Server and a sr_lb_map.xml file is added under C:\Windows\System32\msmq\Mapping.

  9. Repeat the procedure to add another Session Recording server.

Troubleshoot

  • Sessions are not recording when you use a CNAME record or an ALIAS record for a Session Recording server. For more information, see Knowledge Center article CTX248554.

  • Recording files can be stored locally but cannot be stored in a Universal Naming Convention (UNC) path. To address this issue, change the start mode of the Citrix Session Recording Storage Manager service to Automatic (Delayed Start).

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

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

发布评论

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

词条统计

浏览:73 次

字数:36453

最后编辑:7 年前

编辑次数:0 次

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