-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Prioritize replica node #1067
Comments
There is no way to do so in the current implementation for cluster mode. redis-rb/lib/redis/cluster/slot.rb Line 29 in 4e76b03
It seems that there is a similar issue for sentinel mode. There might be indeed a performance issue by balancing across regions or availability zones. The more number of queries is, the more total latency is. But I'd say that it might be a bit over responsibility if the client care about it. The client just fetch server connection information. It seems that Redis cluster v2 will be able to proxy requests and aware placement of servers.
|
@vladimir-stornest I added https://github.com/redis/redis-rb/tree/master/cluster Redis::Cluster.new(nodes: nodes, replica: true, replica_affinity: :latency) FYI:
|
When there are multiple replica nodes per master (in a cluster mode), is there an option to prioritize which replica node to be used?
Let's say I have three master nodes: A, B, C. Each master node has two replicas: A1, A2, B1, B2, C1, C2.
The
replica: true
option is used. When a key needs to be read from the A slot, which node will be used between A1 and A2? Is there an option where I can prioritize the A1 node? I'm asking because A1 would be nearest to the application, so reading from it would have the lowest latency.The text was updated successfully, but these errors were encountered: