In private session state, all data related to a specific interaction, such as viewed pages, converted goals, triggered campaigns, or accumulated engagement points, is collected and saved to the session state database.
You can use Redis, MongoDB, or SQL Server as your private session state store. Redis might be an appropriate option if you are running Sitecore on Microsoft Azure.
This walkthrough describes how to use Redis as your private session state store using the Sitecore ASP.NET Session State Store Provider for Redis. It describes how to:
If you are using a Redis session provider, all content delivery servers must use the same provider pointing to the same database.
Deploy a private Redis session database
The Sitecore ASP.NET session state store provider for Redis enables you to use Redis as your session state store. The provider supports the
SessionEnd event, which the xDB needs to track website visits.
To deploy a Redis session database:
- Choose between Azure Redis or Redis on premise. You can provision Azure Redis by using the instructions on the Microsoft Azure website or with Azure PowerShell.
- Go to <sitename>
ConnectionStrings.configfile, and add the following connection string:
<add name="session" connectionString="_host_:_port_number _" />
The value for the name attribute is either
'session'for a private session state, or
'sharedsession'for a shared session state.
- Configure the connection string so that it points to your session database.
- Save your changes.
To configure Sitecore to use the private session state store provider for Redis:
- Go to your site root folder <sitename>\Website, open the
web.configfile and locate the
<sessionState mode="InProc" cookieless="false" timeout="20">
- Update the
sessionStatesection to use the Redis provider instead of InProc, as shown in the following example. Also, change the name attribute value to
<sessionState mode="Custom" customProvider="redis" timeout="20">
Adjust the Redis provider settings
Use the Redis provider settings reference to configure your session state.
If you have configured everything correctly, session records should appear in your Redis session database after the first web request.