Session Recording 2106

Load balancing

Session Recording supports load balancing across Session Recording Servers. This article summarizes the load balancing configuration using the Citrix ADC as an example. For more information, see Configure load balancing in an existing deployment and Deploy and load-balance Session Recording in Azure.

You can synchronize load balancing configurations among all Session Recording Servers.

Note:

The load balancing feature requires Version 7.16 or later of the Session Recording Server and Session Recording Agent.

Changes to Session Recording in support of load balancing:

  • All Session Recording Servers share one folder to store recording files.
  • All Session Recording Servers share one Session Recording Database.
  • (Recommended) Install only one Session Recording Policy Console and all Session Recording Servers share this Console.

Configure load balancing

To use this feature, perform the following steps on Citrix ADC and on the various Session Recording components:

Configure load balancing (Citrix ADC part)

Configure load balancing servers

Add the Session Recording Servers to the load balancing servers in Citrix ADC.

Configure load balancing services

  1. Add a load balancing service for each needed protocol on each Session Recording Server.
  2. (Recommended) Select the relevant protocol monitor to bind each service monitor.

Configure load balancing virtual servers

  1. Create virtual servers with the same Citrix ADC VIP address based on the needed protocols and bind the virtual servers to the relevant load balancing services.
  2. Configure persistence on each virtual server.
  3. (Recommended) Choose LEASTBANDWITH or LEASTPACKETS as the load balancing method rather than the default method (LEASTCONNECTION).
  4. Create a certificate to make the HTTPS virtual server UP.

Configure load balancing (Session Recording part)

On each server where you installed the Session Recording Server, do the following

  1. (Recommended) Type the same Session Recording Database name during the Session Recording Server installation.
  2. If you choose the Administrator Logging feature, Citrix recommends that you type the same Administrator Logging Database name when you install each Session Recording Server.
  3. After sharing the Read/Write permission of the file storage folder with all Session Recording Server machine accounts, change to use the file storage folder as the shared folder in Session Recording Server Properties. For more information, see Specify where recordings are restored.
  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 (DWORD, meaning enable)
  5. If you choose the HTTP or the HTTPS protocol for the Session Recording Storage Manager message queue, create a host record for the Citrix ADC VIP address, add redirections in C:\Windows\System32\msmq\Mapping\sample_map, and restart the Message Queuing service.

    The redirection is similar to:

    <redirections xmlns="msmq-queue-redirections.xml">
            <redirection>
                        <from>http://<ADCHost>*/msmq/private$/CitrixSmAudData</from>
                        <to>http://<LocalFqdn>/msmq/private$/CitrixSmAudData</to>
            </redirection>
            <redirection>
                        <from>https://<ADCHost>*/msmq/private$/CitrixSmAudData</from>
                        <to>https://<LocalFqdn>/msmq/private$/CitrixSmAudData</to>
            </redirection>
    </redirections>
    <!--NeedCopy-->
    

    Where <ADCHost> is the created FQDN of the Citrix ADC VIP address, and <LocalFqdn> is the FQDN of the local host.

  6. (Recommended) After configuring one Session Recording Server registry, you can use the <Session Recording Server installation path>\Scripts\SrServerConfigurationSync.ps1 script to export configurations from this Server registry and import the registry to the other Session Recording Server registries. You can also use the SrServerConfigurationSync.ps1 script to add redirection mapping for message queuing.

    1. On one Session Recording Server, after configuring the EnableLB registry value, start a command prompt as an administrator and run the powershell.exe -file SrServerConfigurationSync.ps1 –Action Export,AddRedirection –ADCHost <ADCHost> command, where <ADCHost> is the created FQDN of the Citrix ADC VIP address.

    2. After the script runs, an exported registry file named SrServerConfig.reg is generated and an sr_lb_map.xml file is added to the C:\Windows\System32\msmq\Mapping path.

    3. On other Session Recording Servers, copy SrServerConfig.reg generated in the preceding step, start a command prompt as an administrator, and run the powershell.exe -file SrServerConfigurationSync.ps1 –Action Import,AddRedirection –ADCHost <ADCHost> command, where <ADCHost> is the created FQDN of the Citrix ADC VIP address.

    4. After the script runs, the EnableLB value is added to the other Session Recording Server registry keys and an sr_lb_map.xml file is added to the C:\Windows\System32\msmq\Mapping path.

On the machine where you installed the Session Recording Agent, do the following in Session Recording Agent Properties

  • If you choose the HTTP or the HTTPS protocol for the Session Recording Storage Manager message queue, type the FQDN of the Citrix ADC VIP address in the Session Recording Server text box.
  • If you choose the default TCP protocol for the Session Recording Storage Manager message queue, type the Citrix ADC VIP address in the Session Recording Server text box.

On the machine where you installed the Session Recording Player, do the following

Add the Citrix ADC VIP address or its FQDN as the connected Session Recording Server.

On the SQL Server where you installed the Session Recording Database, do the following

Add all the Session Recording Server machine accounts to the shared Session Recording Database and assign them with the db_owner permission.

Load balancing