I have set a AWS elasticache redis cluster with cluster mode enabled with below details: - Redis version: 5.0.6 - Shards: 1 - replica count: 3 I see there are total 4 nodes in the cluster, based on replica count: 3 I assume 1 of them is primary and remaining 3 are read replicas. After deployment and starting the traffic/load, we are seeing all Cache Hits and Cache Misses are happening on only 1 nodes in the cluster and remaining 3 does not receive any traffic. Kindly explain if this behavior is correct and why 3 replicas are not used for reading or are they only for data replication purpose, appreciate you inputs on this. Thanks
Comment From: zuiderkwast
The replicas can be used for readonly operations, but many times it is not the default behaviour in clients. Most of them use only the primaries. This means the replicas are only for replication and if the primary goes down, one of the replicas will become the new primary and then the client will probably start using it automatically.
Which client lib are you using? (Maybe there is some config option for the client to use readonly replicas.)
Comment From: nitinware
@zuiderkwast Thnx for ur reply, I think I found a way to connect to redis in hybrid mode for both read and write operations using LettuceConnectionFactory to use both primary and reader endpoints of redis cluster. [ref: https://www.vinsguru.com/redis-master-slave-with-spring-boot/ ]