title | description | author | ms.author | ms.service | ms.topic | ms.date |
---|---|---|---|---|---|---|
Set Redis version for Azure Cache for Redis |
Learn how to configure Redis version |
flang-msft |
franlanglois |
cache |
conceptual |
06/03/2022 |
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.
- Azure subscription - create one for free
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.
:::image type="content" source="media/cache-create/new-cache-menu.png" alt-text="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.
:::image type="content" source="media/cache-how-to-version/select-redis-version.png" alt-text="Redis version.":::
-
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.
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
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
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:
-
In the Azure portal, search for Azure Cache for Redis. Then, press enter or select it from the search suggestions.
:::image type="content" source="media/cache-private-link/4-search-for-cache.png" alt-text="Search for Azure Cache for Redis.":::
-
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.
:::image type="content" source="media/cache-how-to-version/blue-banner-upgrade-cache.png" alt-text="Blue banner that says you can upgrade your Redis 6 cache with additional features and commands that enhance developer productivity and ease of use. Upgrading your cache instance cannot be reversed.":::
-
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.
:::image type="content" source="media/cache-how-to-version/dialog-version-upgrade.png" alt-text="Dialog with more information about upgrading your cache.":::
-
To check on the status of the upgrade, navigate to Overview.
:::image type="content" source="media/cache-how-to-version/upgrade-status.png" alt-text="Overview shows status of cache being upgraded.":::
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
To upgrade a cache from 4 to 6 using PowerShell, use the following command:
Set-AzRedisCache -Name "CacheName" -ResourceGroupName "ResourceGroupName" -RedisVersion "6"
At this time, Redis 6 doesn't support ACL, and geo-replication between a Redis 4 and 6 cache.
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.
- 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