redispipe
redispipe copied to clipboard
Does the client work for Elasticache cluster mode enabled
The client doesn't look like maintains the slot to node mapping. Does this mean that this client can't be used with Elasticache cluster mode enabled?
Why do you think it doesn't maintain slot to node mapping? rediscluster folder is explicitly for that.
Our redis metrics indicate that only the primary is accepting writes and replica is accepting reads. The primary usually accepts writes and reads. Does it have to do with this line of code here? https://github.com/joomcode/redispipe/blob/master/rediscluster%2Fcluster.go#L436-L441

You can set policy with Cluster.WithPolicy: https://github.com/joomcode/redispipe/blob/1283dc72cb1471be0bd0fc5a4a67e1b6ed69722d/rediscluster/rw_policy.go#L26
I don't get which way read commands go to replica if you didn't specify policy, since you correctly mention MasterOnly is primary policy.
I will try this out.
I believe the default behavior should be primary accepting writes and reads and replica is accepting only reads, even without specifying policy. This is the behavior of redis cluster mode.
Can I bring this up as an issue for bug fix?