Introduction

In one of our previous articles Azure Redis Cache – Introduction, we have learnt the basics of Azure Redis Cache along with its features.

Azure provides the following three tiers for Redis Cache.

  1. Basic
  2. Standard
  3. Premium

In both Basic and Standard tier, the data is stored in memory of the VM instance where the service is provisioned. In case of infrastructure or datacenter failures, we cannot recover the data for these two tiers.

Another point to note is that the Standard tier provides 99.9% SLA which is SLA only for the Azure Redis Cache End Point. Azure makes sure that we will be able to access the Azure Redis Cache almost all the time (99.9%). However, this SLA is not application for data.

In order to have the data persistent even after unexpected hard failures issues in the data center, it is recommended to go for Premium tier and enable the Data Persistence feature of Azure Redis Cache which is available only in Premium tier.

You can enable the Data Persistence to a new Redis Cache service or to an existing Redis Cache service.

Configure Data Persistence for a Redis Cache Service

Prerequisites: You need to create a Premium Storage account for configuring the Data Persistence. And, the Premium storage account must be located in the same subscription and the location of the Azure Redis Cache service.

Once you create the Premium Storage account, navigate to the following blade and select the Premium Tier as shown in the below screen capture.

1_selectstorage

As shown in the above screen capture provide the following details in the Redis data persistence blade.

  • By default, the RDB (Redis Database) option is disabled. Click on Enabled button to enable the backup policy.
  • Select the required option in the Backup Frequency dropdown based on your requirement. As of now, below are the available frequency options.
    • 15 minutes
    • 30 minutes
    • 60 minutes
    • 6 hours
    • 12 hours
    • 24 hours
  • Choose the Storage account where you would like to store all these backups. Please note that the Storage type should be premium and the Storage account must be located in the same region and subscription of the Redis Cache service that you are creating now.
  • Select the Storage Key. Redis Cache will internally use this key for storing and connecting to save the backups to the persistent mediums.

Once you provide all the necessary data, click on OK in Redis data persistence and then click on Create in the New Redis Cache blade.

Clicking on Create button will create the Redis Cache as shown below.

2_cachelisting

As shown in the below screen capture, you can check and click on the Redis cache to review the details of the backups.

3_storagedetails

In case if you would like to change any of the Data Persistence settings, you can navigate to the Settings blade of the Redis Cache and click on the Data Persistence as shown below and change the settings that you would like to.

4_settingsblade

Summary

We have learnt the following in this article.

  • What is Data Persistence and why it is useful? We have also learnt that this feature is only available in Premium tier of the Azure Redis Cache.
  • How to configure Data Persistence while creating the Azure Redis Cache.
  • How to make changes to the Date Persistence settings.

Hope you enjoyed reading the article. Your feedback is appreciated.