Migrate from Basic, Standard, and Premium tiers to Azure Managed Redis

Note

Redis Enterprise tiers isn't supported in Microsoft Azure operated by 21Vianet.

This article explains why and how to migrate from Azure Cache for Redis (including Basic, Standard, and Premium tiers) to Azure Managed Redis.

You learn about:

  • The benefits of choosing Azure Managed Redis over previous tiers.
  • Key feature differences between the services.
  • Strategies for migrating your cache data.
  • Ways to ensure a smooth migration process.
  • Guidance on selecting the right Azure Managed Redis SKU and performance tier for your needs.
  • Considerations and recommendations for updating your client applications.

Whether you're using Basic, Standard, Premium, or OSS tiers, this guide helps you plan and execute your migration to Azure Managed Redis.

Benefits of moving from Basic, Standard, or Premium caches to Azure Managed Redis

If you use any of the OSS SKUs, Basic, Standard, or Premium, moving to Azure Managed Redis offers you more features at every level cache.

Here's a table that compares the features from Azure Cache for Redis to the features in Azure Managed Redis

Feature Description Basic
OSS
Standard
OSS
Premium
OSS
Balanced
AMR
Memory Optimized
AMR
Compute Optimized
AMR
Availability N/A 99.9% 99.9% Up to 99.999% Up to 99.999% Up to 99.999%
Data encryption in transit Yes Yes Yes Yes Yes Yes
Network isolation Yes Yes Yes Yes Yes Yes
Scaling up/out Yes Yes Yes Yes Yes Yes
Scaling down/in Yes Yes Yes No No No
OSS clustering No No Yes Yes Yes Yes
Data persistence No No Yes Yes Yes Yes
Zone redundancy No Yes (preview) Yes Yes Yes Yes
Geo-replication No No Yes (Passive) Yes (Active) Yes (Active) Yes (Active)
Connection audit logs No No Yes Yes(Event-based) Yes(Event-based) Yes(Event-based)
Redis Modules No No No Yes Yes Yes
Import/Export No No Yes Yes Yes Yes
Reboot Yes Yes Yes No No No
Scheduled updates Yes Yes Yes No No No
Microsoft Entra ID authentication Yes Yes Yes Yes Yes Yes
Microsoft Entra ID RBAC Yes Yes Yes No No No
Keyspace notification Yes Yes Yes No No No
Non High-availability N/A No No Yes Yes Yes

OSS refers to Azure Cache for Redis
AMR refers to Azure Managed Redis

Here are some other differences to consider when implementing Azure Managed Redis. Consider these client application changes:

Feature Description Azure Cache for Redis Azure Managed Redis
DNS suffix (only for PROD cloud) .redis.cache.chinacloudapi.cn <region>.redis.chinacloudapi.cn
TLS port 6380 10000
Non-TLS port 6379 Not supported
Individual node TLS ports 13XXX 85xx
Individual node non-TLS port 15XXX Not supported
Clustering support OSS clustering mode OSS and Enterprise cluster modes
Unsupported commands Unsupported commands Multi-key commands
Regional availability All Azure regions * See the list of regions after this section.
Redis version 6 7.4
Supported TLS versions 1.2 and 1.3 1.2 and 1.3

Migrate your Basic, Standard, or Premium cache to Azure Managed Redis

Based on the table, here are some mappings between the Azure Cache for Redis SKUs and options for caches in Azure Managed Redis.

Note

Use non High Availability option of Azure Managed Redis for Migrating Basic SKUs

Azure Cache for Redis Azure Managed Redis Additional memory (%)
Basic/Standard - C0 Balanced - B0 50
Basic/Standard - C1 Balanced - B1 0
Basic/Standard - C2 Balanced - B3 17
Basic/Standard - C3 Balanced - B5 0
Basic/Standard - C4 Memory Optimized - M10* -8
Basic/Standard - C4 Memory Optimized - M20** 46
Basic/Standard - C5 Memory Optimized - M20* -8
Basic/Standard - C5 Memory Optimized - M50** 57
Basic/Standard - C6 Memory Optimized - M50 12
Premium - P1 Balanced - B5 0
Premium - P2 Balanced - B10* -8
Premium - P2 Balanced - B20** 46
Premium - P3 Balanced - B20* -8
Premium - P3 Balanced - B50** 57
Premium - P4 Balanced - B50 12
Premium - P5 Balanced - B100 0
  • * This option is for cost efficiency. Ensure the peak of total used memory in the past month is less than the suggested Azure Managed Redis memory to choose this option.
  • ** This option is for abundant memory consumption.

Azure Cache for Redis Premium clustered

  • For sharded cluster, choose a Memory Optimized tier that has equivalent total memory.
  • For clusters with more than one read replica, choose a Compute Optimized tier with equivalent total memory as the primary replica.

Migration options

Client applications should be able to use an Azure Managed Redis instance that has different clustering modes and endpoints. Azure Cache for Redis and Azure Managed Redis are compatible so no application code changes other than connection configurations are required for most scenarios.

Learn more at:

Options for Migrating Azure Cache for Redis to Azure Managed Redis

Option Advantages Disadvantages
Create a new cache Simplest to implement. Need to repopulate data to the new cache, which might not work with many applications.
Export and import data via RDB file Compatible with any Redis cache generally. Some data could be lost, if they're written to the existing cache after the RDB file is generated.
Dual-write data to two caches No data loss or downtime. Uninterrupted operations of the existing cache. Easier testing of the new cache. Needs two caches for an extended period of time.
Migrate data programmatically Full control over how data are moved. Requires custom code.

Create a new Azure Cache for Redis

This approach technically isn't a migration. If losing data isn't a concern, the easiest way to move to Azure Managed Redis tier is to create new cache instance and connect your application to it. For example, if you use Redis as a look-aside cache of database records, you can easily rebuild the cache from scratch. General steps to implement this option are:

  1. Create a new Azure Managed Redis instance.
  2. Update your application to use the new instance.
  3. Delete the old Azure Cache for Redis instance.

Export data to an RDB file and import it into Azure Managed Redis

This option is applicable only to premium tier caches. Open-source Redis defines a standard mechanism for taking a snapshot of a cache's in-memory dataset and saving it to a file. Another Redis cache can read the RDB file that was exported. Azure Cache for Redis premium tier supports exporting data from a cache instance via RDB files. You can use an RDB file to transfer data from an existing Azure Cache for Redis instance to Azure Managed Redis instance.

General steps to implement this option are:

  1. Create a new Azure Managed Redis instance that is the same size (or bigger than) the existing Azure Cache for Redis instance.
  2. Export the RDB file from existing Azure Cache for Redis instance using these export instructions or the PowerShell Export cmdlet
  3. Import the RDB file into new Azure Managed Redis instance using these import instructions or the PowerShell Import cmdlet
  4. Update your application to use the new Azure Managed Redis instance connection string.

Write to two Redis caches simultaneously during migration period

Rather than moving data directly between caches, you can use your application to write data to both an existing cache and a new one you're setting up. The application still reads data from the existing cache initially. When the new cache has the necessary data, you switch the application to that cache and retire the old one. Let's say, for example, you use Redis as a session store and the application sessions are valid for seven days. After writing to the two caches for a week, you'll be certain the new cache contains all nonexpired session information. You can safely rely on it from that point onward without concern over data loss.

General steps to implement this option are:

  1. Create a new Azure Managed Redis instance that is the same size as (or bigger than) the existing Azure Cache for Redis instance.
  2. Modify application code to write to both the new and the original instances.
  3. Continue reading data from the original instance until the new instance is sufficiently populated with data.
  4. Update the application code to reading and writing from the new instance only.
  5. Delete the original instance.

Migrate programmatically

Create a custom migration process by programmatically reading data from an existing Azure Cache for Redis instance and writing them into Azure Managed Redis instance. There are two open source tools you can try:

  • Redis-copy
    • This open-source tool can be used to copy data from one Azure Cache for Redis instance to another. This tool is useful for moving data between cache instances in different Azure Cache regions. A compiled version is available as well. You can also find the source code to be a useful guide for writing your own migration tool.
  • RIOT
    • RIOT is another popular migration tool tested by Redis community. It's a command-line utility designed to help you get data in and out of Redis.

Note

This tool isn't officially supported by Microsoft.

General steps to implement this option are:

  1. Create a VM in the region where the existing cache is located. If your dataset is large, choose a relatively powerful VM to reduce copying time.
  2. Create a new Azure Managed Redis instance.
  3. Flush data from the new cache to ensure that it's empty. This step is required because the copy tool itself doesn't overwrite any existing key in the target cache. Important: Make sure to NOT flush from the source cache.
  4. Use an application such as the open-source tool mentioned previously to automate the copying of data from the source cache to the target. Remember that the copy process could take a while to complete depending on the size of your dataset.

Regional availability for Azure Managed Redis

Azure Managed Redis is continually expanding into new regions. To check the availability by region, see Products available by region.