How to connect to the redis sharded cluster?
savyad opened this issue · comments
how can we connect to a redis cluster.
Like ioredis does provide way to connect to the redis cluster.
this accepts the same options of ioredis
in ioredis to connect to the cluster you need to create a separate instance of the cluster like this.
const cluster = new Redis.Cluster([
{
port: 6380,
host: "127.0.0.1",
},
{
port: 6381,
host: "127.0.0.1",
},
]);