go-redis icon indicating copy to clipboard operation
go-redis copied to clipboard

ReadFromAny (master+replica) without cluster mode (Master-Replica setup)

Open singh-bhawani opened this issue 1 year ago • 0 comments

Right now, with go-redis, we can't read from both the Master and its Replica without being in cluster mode. Also, when we use "ReplicaOnly", it randomly chooses Replica to read. This causes a problem because caching is mainly used for read heavy usecase, which means the Master only used for write throughput and it's resource are underutilized.

To solve this, I added "ReadFromAny" to "FailoverOptions". This means that read-only commands will come from both Replicas as well as Master. This way, we can make better use of the caching resource.

singh-bhawani avatar May 13 '24 08:05 singh-bhawani