Set Redis version for Azure Cache for Redis
In this article, you'll learn how to configure the Redis software version to be used with your cache instance. Azure Cache for Redis offers the latest major version of Redis and at least one previous version. It will update these versions regularly as newer Redis software is released. You can choose between the two available versions. Keep in mind that your cache will be upgraded to the next version automatically if the version it's using currently is no longer supported.
Note
At this time, Redis 6 does not support ACL, and geo-replication between a Redis 4 and 6 cache.
Prerequisites
- Azure subscription - create one for free
Create a cache using the Azure portal
To create a cache, follow these steps:
Sign in to the Azure portal and select Create a resource.
On the New page, select Databases and then select Azure Cache for Redis.
On the Basics page, configure the settings for your new cache.
Setting Suggested value Description Subscription Select your subscription. The subscription under which to create this new Azure Cache for Redis instance. Resource group Select a resource group, or select Create new and enter a new resource group name. Name for the resource group in which to create your cache and other resources. By putting all your app resources in one resource group, you can easily manage or delete them together. DNS name Enter a globally unique name. The cache name must be a string between 1 and 63 characters that contains only numbers, letters, or hyphens. The name must start and end with a number or letter, and can't contain consecutive hyphens. Your cache instance's host name will be <DNS name>.redis.cache.windows.net. Location Select a location. Select a region near other services that will use your cache. Cache type Select a cache tier and size. The pricing tier determines the size, performance, and features that are available for the cache. For more information, see Azure Cache for Redis Overview. On the Advanced page, choose a Redis version to use.
Select Create.
It takes a while for the cache to create. You can monitor progress on the Azure Cache for Redis Overview page. When Status shows as Running, the cache is ready to use.
Create a cache using Azure PowerShell
New-AzRedisCache -ResourceGroupName "ResourceGroupName" -Name "CacheName" -Location "West US 2" -Size 250MB -Sku "Standard" -RedisVersion "6"
For more information on how to manage Azure Cache for Redis with Azure PowerShell, see here
Create a cache using Azure CLI
az redis create --resource-group resourceGroupName --name cacheName --location westus2 --sku Standard --vm-size c0 --redisVersion="6"
For more information on how to manage Azure Cache for Redis with Azure CLI, see here
Upgrade an existing Redis 4 cache to Redis 6
Azure Cache for Redis supports upgrading your Redis cache server major version from Redis 4 to Redis 6. Upgrading is permanent and it might cause a brief connection blip. As a precautionary step, we recommend exporting the data from your existing Redis 4 cache and testing your client application with a Redis 6 cache in a lower environment before upgrading. For more information, see here for details on how to export.
Note
Please note, upgrading is not supported on a cache with a geo-replication link, so you will have to manually unlink your cache instances before upgrading.
To upgrade your cache, follow these steps:
Upgrade using the Azure portal
In the Azure portal, search for Azure Cache for Redis. Then, press enter or select it from the search suggestions.
Select the cache instance you want to upgrade from Redis 4 to Redis 6.
On the left side of the screen, select Advanced setting.
If your cache instance is eligible to be upgraded, you should see the following blue banner. If you wish to proceed, select the text in the banner.
A dialog box displays a popup notifying you that upgrading is permanent and might cause a brief connection blip. Select Yes if you would like to upgrade your cache instance.
To check on the status of the upgrade, navigate to Overview.
Upgrade using Azure CLI
To upgrade a cache from 4 to 6 using the Azure CLI, use the following command:
az redis update --name cacheName --resource-group resourceGroupName --set redisVersion=6
Upgrade using PowerShell
To upgrade a cache from 4 to 6 using PowerShell, use the following command:
Set-AzRedisCache -Name "CacheName" -ResourceGroupName "ResourceGroupName" -RedisVersion "6"
FAQ
What features aren't supported with Redis 6?
At this time, Redis 6 doesn't support ACL, and geo-replication between a Redis 4 and 6 cache.
Can I change the version of my cache after it's created?
You can upgrade your existing Redis 4 caches to Redis 6, see here for details. Upgrading your cache instance is permanent and you cannot downgrade your Redis 6 caches to Redis 4 caches.
Next Steps
- To learn more about Redis 6 features, see Diving Into Redis 6.0 by Redis
- To learn more about Azure Cache for Redis features: Azure Cache for Redis Premium service tiers
Tilbakemeldinger
Send inn og vis tilbakemelding for