-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
(discovery via an off-list email chain)
See ServerSelectionStrategy.Select; in the non-cluster scenario (aka NoSlot), we use the local Any method which does an Interlocked.Increment of the base offset to apply a crude round-robin.
However, in the redis-cluster scenario, for replicas, we use FindSlave which iterates the replica nodes for a given ServerEndPoint (the master endpoint for that slot). We do not apply any round-robin, with the consequence that in a multi-replica scenario, all "prefer slave" / "demand slave" requests go to the first replica (unless it is unavailable).
For balancing, we should add some kind of base-offset integer to the parent ServerEndPoint, and used in the same way that the global anyStartOffset currently works. We could also possibly just use anyStartOffset? it'll still rotate, which is all we really need...