The Live Session Agent module enables you to trigger and process engagement automation states (EAS states) by timeout closer to the timeout delay set on the automation state.
Sitecore 8.2 supports Sitecore Engagement Automation Live Session Agent 2.0. which is available to download from the Sitecore Developer Portal.
After you have installed the module, you should test the performance of your Sitecore solution so that you can then fine-tune the configuration settings of the module. When you test, you should note the following metrics:
- System throughput
- Request latency
- Load on the session state database – measured in transactions per second or the equivalent, both when the system is in an idle state and when loaded.
- CPU usage on content delivery and processing servers – both when idle and when the system is loaded.
- The average processing delay on EAS states (performance counter in the component).
You can change the following configuration file settings to fine-tune the performance of the Live Session Agent. The configuration files are stored in the Include folder (
Sitecore.EngagementAutomation.LiveSessionAgent.Processing.config configuration file to configure Live Session Agent processing settings.
Wake-up interval of EAS Live session
The wake-up interval is the setting that controls how frequently the Live Session Agent polls the queue of contact sessions for new EAS items to be processed.
Specify the interval between each EAS state item that is processed.
The default interval value is 15 seconds. If you set this parameter too high, it can create a significant delay between EAS states becoming due and actually getting processed. Setting this parameter to a low value imposes a sustained load on the session state database (MongoDB or SQL Server) even when the system is idle.
Maximum number of parallel threads
This setting enables you to set the number of parallel threads for processing contacts with pending automation states. This setting is specified in the following node:
Specify the maximum number of parallel threads that you want to allocate for processing.
The Live Session agent allocates processing threads from the same thread pool as ASP.NET worker threads, which may have an impact on your overall system throughput. You should not set the number of threads to more than 20% of the number of ASP.NET worker threads on a content delivery server. On a dedicated processing server, the number of threads can reach the size of the .NET thread pool if necessary.
Live session agent settings
Sitecore.EngagementAutomation.LiveSessionAgent.config configuration file to configure general settings for the Live Session Agent.
Number of slots
This setting determines the number of slots that store queued contact identifiers for processing.
Specify the number of slots that you want to make available for storing queued contact identifiers for processing.
The number of slots you choose depends on the number of concurrent requests supported by the system. The default value is 100. This means that if your system has a load of 200 RPS, each slot will be locked and updated approximately 2 times per second.
Slots are stored in a shared session as session state items. Setting the number of slots to a low value will directly affect request latency and throughput of the system. Setting the number of slots to a high value can apply a sustained load on the session database even when the system is idle. In addition, this may cause unnecessary delays in processing EAS states, because more slots need to be scanned to find pending contact sessions.
Maximum number of items to lock for processing
This setting determines the number of items taken from each slot for processing during agent iterations.
Specify the maximum number of items you want to lock for processing
To eliminate possible significant delays when processing EAS timeouts, the system tries to access all existing slots on each polling interval and takes only a portion of data from each slot for processing. Setting this parameter to a low value can cause high traffic to the session database when the Live Session Agent actively processes EAS states. Setting this parameter to a high value can cause unnecessary delays between EAS states becoming due and getting processed.
To calculate the value, multiply the number of contact sessions by the processing interval and divide that by the number of available slots.