Walkthrough: Configuring a private session state database using the Redis provider
In a 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.
This walkthrough describes how to use Redis as your private session state store using the Sitecore ASP.NET Session state store provider for Redis.
This walkthrough describes how to:
-
Deploy a private Redis session database
-
Configure Sitecore
-
Configure a dedicated Redis Session Processing server
-
Adjust session state settings
Sitecore does not support Redis Cluster.
To prevent unexpected behavior such as data loss, we recommend that you do not enable aspnet:AllowConcurrentRequestsPerSession. These issues might occur when using this option because the session is not blocked during the request.
Deploy a private Redis session 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 the
<sitename>\App_Config\folder, open theConnectionStrings.configfile, and add the following connection string: -
Configure the connection string so that it points to your session database.
-
Save your changes.
Configure Sitecore
Configure Sitecore
To configure Sitecore to use the private session state store provider for Redis:
-
Go to your site root folder, open the
web.configfile, and locate thesesssionStatesection: -
In the
sessionStatesection, update thecustomProviderattribute to use theredisprovider instead ofInProc, as shown in the following example. Also, change the value of thenameattribute toredis:
Adjust the Redis provider settings
Adjust the Redis provider settings
Use the Redis provider settings reference to configure your session state. If you have configured everything correctly, the session records appear in your Redis session database after the first web request.