Kentico session data with Azure Redis cache

Chibin Zhang asked on October 29, 2019 00:43

Hi all,

I have a question about the using the Azure Redis cache to store the Kentico session data. We have multiple app services in different availability zones running the website, and each app service has the potential to scale out to multiple instances.

The questions are:

  1. Do we need one redis cache service for each app service we have, or only one for all the app services for best practice?
  2. We haven't implemented using redis cache for caching. If we do that, is the answer still the same?

We are also using a Azure storage account to store the media files. Do the answers from above apply on it as well?


Correct Answer

Mike Wills answered on November 5, 2019 06:01

Hi Chibin,

Regarding your questions:

  1. This depends on whether or not you are isolating traffic to region-based zones. For example, if each of your availability zones are in separate regions, and you are isolating traffic from those regions to specific zones, you could have a separate Azure Redis Cache for each region. This could reduce cache latency. On the other hand, if you are not using zone isolation, and any client can hit any zone at any time, then you need one Azure Redis Cache instance, so that no matter which app services receives your user request, the same session state will be used.
  2. The answer will be the same when using Azure Redis Cache for both caching and session state.
  3. For Azure Storage, you would use one storage account shared by all app services. So, if someone uploads an image for one app service, the image will be available across all app services and availability zones.

I hope this helps.


0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.