1 Answer
- Newest
- Most votes
- Most comments
0
There could be a few reasons why you are not able to see the data in Redis CLI that you are able to retrieve via the Node.js code:
- The Redis CLI connection is not pointing to the same endpoint as the Node.js client. Make sure the Redis CLI is connecting to the same endpoint as the primary node of the Redis cluster.
- The data is stored on a different shard/node than where the Redis CLI is connected. Redis cluster partitions the data across multiple nodes/shards. The CLI may be connected to a different node/shard than where the key exists.
- The Redis CLI is not configured to connect to a Redis cluster. For a cluster setup, Redis CLI needs to be compiled with cluster mode enabled.
Having said that, please check these:
- Connect Redis CLI to the same endpoint as the primary node using
redis-cli -c -h <redis-cluster-endpoint> -p 6379
- Use Redis CLI CLUSTER commands like
CLUSTER NODES
to check cluster configuration and nodes,
CLUSTER KEYSLOT
to identify shard for the key
- Recompile Redis CLI with cluster mode enabled if not already done so.
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 7 months ago