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
docs: add Azure Cache for Redis and Redis Enterprise configuration guide (#72)
Fixes#72 - Document proper client configuration for Azure Cache for Redis
and Redis Enterprise deployments that use proxy layers.
Changes:
- Add comprehensive Azure/Enterprise configuration section to README
- Add test demonstrating correct client configuration approach
- Clarify that standard Redis client should be used, not RedisCluster
- Explain proxy architecture and why it requires this configuration
The key is that Azure Cache for Redis and similar enterprise
deployments use a proxy layer that makes clusters appear as single
endpoints. This requires using a standard Redis client rather than
a cluster-aware client to avoid detection issues and cross-slot errors.
Copy file name to clipboardExpand all lines: README.md
+56Lines changed: 56 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,62 @@ If you're using a Redis version lower than 8.0, you'll need to ensure these modu
40
40
41
41
Failure to have these modules available will result in errors during index creation and checkpoint operations.
42
42
43
+
### Azure Cache for Redis / Redis Enterprise Configuration
44
+
45
+
If you're using **Azure Cache for Redis** (especially Enterprise tier) or **Redis Enterprise**, there are important configuration considerations:
46
+
47
+
#### Client Configuration
48
+
49
+
Azure Cache for Redis and Redis Enterprise use a **proxy layer** that makes the cluster appear as a single endpoint. This requires using a **standard Redis client**, not a cluster-aware client:
50
+
51
+
```python
52
+
from redis import Redis
53
+
from langgraph.checkpoint.redis import RedisSaver
54
+
55
+
# ✅ CORRECT: Use standard Redis client for Azure/Enterprise
56
+
client = Redis(
57
+
host="your-cache.redis.cache.windows.net", # or your Redis Enterprise endpoint
58
+
port=6379, # or 10000 for Azure Enterprise with TLS
59
+
password="your-access-key",
60
+
ssl=True, # Azure/Enterprise typically requires SSL
61
+
ssl_cert_reqs="required", # or "none" for self-signed certs
62
+
decode_responses=False# RedisSaver expects bytes
63
+
)
64
+
65
+
# Pass the configured client to RedisSaver
66
+
saver = RedisSaver(redis_client=client)
67
+
saver.setup()
68
+
69
+
# ❌ WRONG: Don't use RedisCluster client with Azure/Enterprise
70
+
# from redis.cluster import RedisCluster
71
+
# cluster_client = RedisCluster(...) # This will fail with proxy-based deployments
72
+
```
73
+
74
+
#### Why This Matters
75
+
76
+
-**Proxy Architecture**: Azure Cache for Redis and Redis Enterprise use a proxy layer that handles cluster operations internally
77
+
-**Automatic Detection**: RedisSaver will correctly detect this as non-cluster mode when using the standard client
0 commit comments