You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/redis/best-practices-client-libraries.md
+22-64Lines changed: 22 additions & 64 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,9 @@
1
1
---
2
2
title: Best practices using client libraries with Azure Managed Redis
3
3
description: Learn about client libraries for Azure Managed Redis.
4
-
ms.date: 05/18/2025
5
-
ms.topic: conceptual
4
+
ms.date: 11/24/2025
5
+
ms.topic: article
6
+
6
7
ms.custom:
7
8
- devx-track-java
8
9
- devx-track-javaee
@@ -17,29 +18,30 @@ appliesto:
17
18
18
19
# Azure Managed Redis Client libraries
19
20
20
-
Azure Managed Redis is based on the popular in-memory data store, Redis. Redis clients for many programming languages can access Azure Managed Redis. Each client library has its own API that makes calls to Redis server using Redis commands, but the client libraries are built to talk to any Redis server.
21
+
This article helps you choose and use the best client libraries for Azure Managed Redis. You learn which libraries to use for your programming language, how to handle clustering policies, and avoid common connection issues.
22
+
23
+
Azure Managed Redis is based on the popular in-memory data store, Redis. Redis clients for many programming languages can access Azure Managed Redis. Each client library has its own API that makes calls to Redis server using Redis commands, but the client libraries are built to talk to any Redis server.
21
24
22
25
Each client library maintains its own reference documentation. The libraries also provide links to get support through the client library developer community. The Azure Managed Redis team doesn't own the development, or the support for any client libraries.
23
26
24
27
The following recommendations are based on popularity and whether there's an active online community to support and answer your questions. We only recommend using the latest available version, and upgrading regularly as new versions become available. These libraries are under active development and often release new versions with improvements to reliability and performance.
| ioredis | Node.js |[ioredis GitHub](https://github.com/luin/ioredis)|[ioredis API reference](https://ioredis.readthedocs.io/en/stable/API/)|
34
36
35
37
> [!NOTE]
36
-
> Your application can use any client library that is compatible with open-source Redis to connect to your Azure Managed Redis instance.
38
+
> Your application can use any client library that's compatible with open-source Redis to connect to your Azure Managed Redis instance.
37
39
38
40
## Choosing the right client library based on your clustering policy
39
41
40
42
Azure Managed Redis supports the Enterprise clustering policy and the OSS clustering policy. See more information here (add link to clustering policy information).
41
43
42
-
All client libraries work with your Redis instance with Enterprise clustering policy. However, if you're using the OSS clustering policy, ensure that the client library you choose supports connecting to clustered Redis instances.
44
+
All client libraries work with your Redis instance with Enterprise clustering policy. However, if you're using the OSS clustering policy, ensure that the selected client library supports connecting to clustered Redis instances.
43
45
44
46
## Blocked commands
45
47
@@ -68,64 +70,20 @@ In Active-Active databases, multi-key write commands (`DEL`, `MSET`, `UNLINK`) c
68
70
69
71
## Client library-specific guidance
70
72
71
-
For information on client library-specific guidance best practices, see the following links:
We _recommend_ you use redisson 3.14.1 or higher. Older versions contain known connection leak issues that cause problems after failovers. Monitor the Redisson changelog for other known issues can affect features used by your application. For more information, see[`CHANGELOG`](https://github.com/redisson/redisson/blob/master/CHANGELOG.md) and the [Redisson FAQ](https://github.com/redisson/redisson/wiki/16.-FAQ).
84
-
85
-
Other notes:
86
-
87
-
- Redisson defaults to 'read from replica' strategy, unlike some other clients. To change this default, modify the 'readMode' config setting.
88
-
- Redisson has a connection pooling strategy with configurable minimum and maximum settings, and the default minimum values are large. The large defaults could contribute to aggressive reconnect behaviors or 'connection storms.' To reduce the risk, consider using fewer connections because you can efficiently pipeline commands, or batches of commands, over a few connections.
89
-
- Redisson has a default idle connection time-out of 10 seconds, which leads to more closing and reopening of connections than ideal.
90
-
91
-
Here's a recommended baseline configuration for cluster mode that you can modify as needed:
For an article about Redisson's support for JCache as the store for HTTP session state in IBM Liberty on Azure, see [Use Java EE JCache with Open Liberty or WebSphere Liberty on an Azure Kubernetes Service (AKS) cluster](/azure/developer/java/ee/how-to-deploy-java-liberty-jcache).
73
+
Choose your programming language to get detailed best practices and connection guidance:
74
+
75
+
-[StackExchange.Redis (.NET) best practices](best-practices-connection.md#using-forcereconnect-with-stackexchangeredis)
76
+
-[Lettuce (Java) best practices](https://github.com/Azure/AzureCacheForRedis/blob/main/Lettuce%20Best%20Practices.md)
77
+
-[Jedis (Java) best practices](https://github.com/Azure/AzureCacheForRedis/blob/main/Redis-BestPractices-Java-Jedis.md)
78
+
-[Node.js best practices](https://github.com/Azure/AzureCacheForRedis/blob/main/Redis-BestPractices-Node-js.md)
79
+
-[PHP best practices](https://github.com/Azure/AzureCacheForRedis/blob/main/Redis-BestPractices-PHP.md)
80
+
-[HiRedisCluster best practices](https://github.com/Azure/AzureCacheForRedis/blob/main/HiRedisCluster%20Best%20Practices.md)
123
81
124
82
## How to use client libraries
125
83
126
84
Besides the reference documentation, you can find tutorials showing how to get started with Azure Managed Redis using different languages and cache clients.
127
85
128
-
For more information on using some of these client libraries in tutorials, seethe following articles:
86
+
For more information on using some of these client libraries in tutorials, seethe following articles:
129
87
130
88
-[Code a .NET Framework app](dotnet-how-to-use-azure-redis-cache.md)
131
89
-[Code a .NET Core app](dotnet-core-quickstart.md)
|**Region**| Drop down and select a location. | Azure Managed Redis is available in selected Azure regions. |
21
23
|**Data tier**| Select either **In-memory** for high-performance, or **Flash** for lower performance caches | The in-memory tiers include **Balanced**, **Memory Optimized**, and **Compute Optimized**. Use the **Flash** tier to use in-memory (RAM) and on-disk (SSD) data storage. |
22
24
|**Cache Size**| Drop down and select a size. | Cache size depends on tier. The smallest size is a Balanced tier. The size largest in-memory tier is a Memory Optimized tier. |
23
-
|**Performance**| Drop down and select a performance preference. | Performance depends on the number of vCPUs. Number of vCPU varies with tier. Compute Optimized has the most vCPUs. |
25
+
|**Performance**| Drop down and select a performance preference. | Performance depends on the number of vCPUs. Number of vCPU varies with tier. Compute Optimized has the most vCPUs. |
24
26
25
27
For guidance on choosing the right performance tier, see [Choosing the right tier](../overview.md#choosing-the-right-tier).
1. Select **Next: Networking** , and select either a **Public Endpoint** or **Private Endpoint**.
31
+
1. Select **Next: Networking** , and select either a **Disable public access and use private access** or **Enable public access from all networks**.
31
32
32
33
1. Select **Next: Active geo-replication**. To use active geo-replication it must be enabled during provisioning. Caches without active geo-replication can't be added to or join active geo-replication groups later. For more information, see [Configure active geo-replication for Azure Managed Redis instances](../how-to-active-geo-replication.md).
33
34
34
35
1. Select the **Next: Advanced** tab.
35
36
36
37
Configure any [Redis modules](../redis-modules.md) you want to add to the instance.
37
38
38
-
By default, for a new managed cache:
39
-
- Microsoft Entra ID is enabled.
40
-
-**Access Keys Authentication** is disabled for security reasons.
41
-
42
-
> [!IMPORTANT]
43
-
> For optimal security, we recommend that you use Microsoft Entra ID with managed identities to authorize requests against your cache if possible. Authorization by using Microsoft Entra ID and managed identities provides superior security and ease of use over shared access key authorization. For more information about using managed identities with your cache, see [Use Microsoft Entra ID for cache authentication](/azure/azure-cache-for-redis/cache-azure-active-directory-for-authentication).
44
-
45
39
Set **Clustering policy**:
46
40
- Use **Enterprise** in order to use RedisSearch or other modules
47
41
- Use **OSS** for a clustered cache.
48
42
- Use **Non-clustered (Preview)** for a non-clustered cache.
49
43
50
44
For more information on choosing **Clustering policy**, see [Cluster policy](../architecture.md#cluster-policies).
51
45
52
-
<!-- :::image type="content" source="media/managed-redis-create/managed-redis-advanced-settings.png" alt-text="Screenshot that shows the Azure Managed Redis Advanced tab."::: -->
46
+
By default, for a new managed cache:
47
+
- Microsoft Entra ID is enabled.
48
+
-**Access Keys Authentication** is disabled for security reasons.
53
49
54
50
> [!IMPORTANT]
55
-
> You can't change the clustering policy of an Azure Managed Redis instance after you create it. If you're using [RediSearch](../redis-modules.md#redisearch), the Enterprise cluster policy is required, and `NoEviction` is the only eviction policy supported.
51
+
> You can't change modules after you create a cache instance. Modules must be enabled at the time you create an Azure Managed Redis instance. There is no option to enable the configuration of a module after you create a cache.
56
52
>
57
53
58
54
> [!IMPORTANT]
59
-
> If you're using this cache instance in a geo-replication group, eviction policies cannot be changed after the instance is created. Be sure to know the eviction policies of your primary nodes before you create the cache. For more information on active geo-replication, see [Active geo-replication prerequisites](../how-to-active-geo-replication.md#active-geo-replication-prerequisites).
55
+
> For optimal security, we recommend that you use Microsoft Entra ID with managed identities to authorize requests against your cache if possible. Authorization by using Microsoft Entra ID and managed identities provides superior security and ease of use over shared access key authorization. For more information about using managed identities with your cache, see [Use Microsoft Entra ID for cache authentication](/azure/azure-cache-for-redis/cache-azure-active-directory-for-authentication).
56
+
57
+
> [!IMPORTANT]
58
+
> You can't change the clustering policy of an Azure Managed Redis instance after you create it. If you're using [RediSearch](../redis-modules.md#redisearch), the Enterprise cluster policy is required, and `NoEviction` is the only eviction policy supported.
60
59
>
61
60
62
61
> [!IMPORTANT]
63
-
> You can't change modules after you create a cache instance. Modules must be enabled at the time you create an Azure Cache for Redis instance. There is no option to enable the configuration of a module after you create a cache.
62
+
> If you're using this cache instance in a geo-replication group, eviction policies cannot be changed after the instance is created. Be sure to know the eviction policies of your primary nodes before you create the cache. For more information on active geo-replication, see [Active geo-replication prerequisites](../how-to-active-geo-replication.md#active-geo-replication-prerequisites).
Copy file name to clipboardExpand all lines: articles/redis/includes/redis-cache-resource-group-clean-up.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
ms.date: 05/18/2025
2
+
ms.date: 11/24/2025
3
3
ms.topic: include
4
4
ms.custom:
5
5
- build-2025
@@ -18,7 +18,7 @@ Otherwise, if you're finished with the quickstart sample application, you can de
18
18
19
19
1. In the **Filter by name** textbox, type the name of your resource group. The instructions for this article used a resource group named `TestResources`. On your resource group in the result list, select **Test Resources** then **Delete resource group**.
20
20
21
-
:::image type="content" source="../media/java-redisson-get-started/redis-cache-delete-resource-group.png" alt-text="Screenshot of the Azure portal that shows the Resource group page with the Delete resource group button highlighted." lightbox="../media/java-redisson-get-started/redis-cache-delete-resource-group.png":::
21
+
:::image type="content" source="media/cache-delete-resource-group/cache-confirm-deletion.png" alt-text="Screenshot of the Azure portal that shows the Resource group page with the Delete resource group button highlighted." lightbox="media/cache-delete-resource-group/cache-delete-resource-group.png":::
22
22
23
23
1. Type the name of your resource group to confirm deletion and then select **Delete**.
0 commit comments