ISICO-14127: roundrobin requests to dynomite nodes#156
ISICO-14127: roundrobin requests to dynomite nodes#156
Conversation
…buted to other nodes in Dynomite cluster.
…e need to set availabilityZone to null. So that there is no localRack affinity and requests get distributed.
sarmuru2
left a comment
There was a problem hiding this comment.
we dont need to specifically set LocalRack to null. please check it
We could have removed the line setLocalRack. Retained it to highlight that we don't need local rack affinity. |
manjurad
left a comment
There was a problem hiding this comment.
Please don't merge any changes to master directly. Open the change to integ/commonbranch and after testing is done in QA cloud, only then should changes be merged into master
| * So that there is no localRack affinity and requests get distributed. | ||
| */ | ||
| .setLoadBalancingStrategy(LoadBalancingStrategy.RoundRobin) | ||
| .setLocalRack(null); |
There was a problem hiding this comment.
Instead of making this change in code, isn't it better to remove this setting from the config
https://bitbucket-eng-sjc1.cisco.com/bitbucket/projects/AN/repos/galaxy/browse/docker/config/dynomite-cluster.config.properties#78
Problem:
In our case, all nodes in dynomite cluster are replicas without any sharding. So we are using same Token for all 3 nodes. By default load balancing strategy used by Dyno client is TokenAware. Also local rack affinity(availabilityZone) set to us-east-1a. As a result all the requests will go to one node that exists in us-east-1a.
Solution:
Configure Dyno client to use RoundRobin strategy. But In our topology we have only one node per rack and availabilityZone(localRack) set to a rack. Even after setting LBStrategy to Roundrobin, Dyno client will try to distribute within the localRack, which results in all requests going to that one node in that specific rack.
Given the above topology, for roundrobin LB strategy to work we need to set availabilityZone to null. So that there is no localRack affinity and requests get distributed.