ioredis
ioredis copied to clipboard
Support for Elastiche Redis with cluster mode disabled
Hello, can someone give a recommendation on how to connect to AWS Elasticache with cluster mode disable? Ideally, all reads should be distributed automatically among the replicas. This is not the case for me. Only the primary node is used for both read and write. Other nodes are idle. Thank you.
ioredis doesn't provide built-in support for this. Maybe use a connection pool to do this manually. An example:
const conns = [new Redis(/* replica 1 */ ), new Redis(/* replica 2 */ ), new Redis(/* replica 3 */ )]
_.sample(conns).get('foo')