Session Recording

Load balance Session Recording servers

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, we recommend you type the same Administrator Logging Database name when you install each Session Recording server.
  3. Share the Read/Write permission of the file storage folder with all Session Recording server machine accounts. After that, 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 and add redirections in C:\Windows\System32\msmq\Mapping\sample_map. After that, 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 balance Session Recording servers