Hello,
redis version: 5.0.6 (Cluster mode)
lettuce-core:5.2.1.RELEASE
1 master and 3 replicas
6 client hosts
Majority of our get_cmd traffic goes to one of the replicas, and it has been like this for the pass 7 days. Need some help here on how to get the load to distribute more evenly. Thanks.
Code to setup the lettuce client:
ClusterTopologyRefreshOptions topologyRefreshOptions = ClusterTopologyRefreshOptions.builder()
.enablePeriodicRefresh(60mins)
.enableAllAdaptiveRefreshTriggers()
.build();
ClusterClientOptions clientOptions = ClusterClientOptions.builder()
.topologyRefreshOptions(topologyRefreshOptions)
.build();
RedisClusterClient redisClusterClient = RedisClusterClient.create(uri);
redisClusterClient.setOptions(clientOptions);
redisClusterClient.setDefaultTimeout(timeout);
StatefulRedisClusterConnection<byte[], byte[]> connect = redisClusterClient.connect(new ByteArrayCodec());
connect.setReadFrom(ReadFrom.REPLICA);