All my GET commands are being called from the same node, which has 1 shard 3 node configuration. Of which 2 nodes are in one region and 3rd in another region.
使用与上面类似的 redis 集群连接
如何在redis集群中平均分配GET命令请求
我已经在 node.js 中编写了我的代码并使用 ioredis 包:
const Redis = require('ioredis');
const clusterNodes = [
{
host: 'node1.redis.cluster.com',
port: 6379
},
{
host: 'node2.redis.cluster.com',
port: 6379
},
{
host: 'node3.redis.cluster.com',
port: 6379
}
];
const redis = new Redis.Cluster(clusterNodes);