Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

singh-bhawani
Copy link

@singh-bhawani singh-bhawani commented May 13, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant