2

I'm using Redisson ( redisson-all-3.5.5.jar )to connect to AWS Elasticache running in Cluster mode disabled. The cluster has 1 primary and 2 replica nodes. The application uses Redisson's Spring Cache abstraction support.

I have configured Redisson in Master-Slave mode providing the primary end-point as master and replica end-points as slaves. I load the application by making few hundred simultaneous requests hitting the cache. When I view CloudWatch metrics, I notice that there are no CacheHits for the replica nodes. All the requests seem to be going only to the master/primary node.

I have tried SLAVE as well as MASTER-SLAVE for read-mode attribute. I played around with the LoadBalancer class trying out RoundRobin and Random , but to no luck.

The idea behind using multiple replicas was to distribute read load and not just for high-availability. It is important for us to read from slave nodes. Is there some setting that needs to be enabled to allow Redisson to read from slave nodes ?

shunya
  • 31
  • 1
  • 4

1 Answers1

1

Use Replicated mode instead of master-slave mode and use the read mode as slave/master_slave

This should solve your issue.

https://github.com/redisson/redisson/wiki/2.-Configuration#25-replicated-mode

ark
  • 167
  • 1
  • 1
  • 14