Posts

How to create Pipeline in RedisCluster

Image
Today I am going to share my experience with Spring-data-redis + Redis 3.2 with cluster. In one of the project we are using spring-data-redis with Redis 3.2 cluster and facing slow performance issue on production after deployment of our changes. After Analysis, I have find out that in one of the functionality we are sending HMGET redis command for multiple keys at a time and also found that Jedis library does not supports the pipeline for Redis 3.2 cluster. So we analyzed lots of things, like implement pipeline by our self or use Multi Threading or use Async IO Redis Clinet e.g. Redisson. I am going to explain implementation of pipeline for Redis 3.2 using Jedis library. Following example is just assumption for Redis Cluster with Slots and Keys associated with slots. In the above example, I have redis cluster with three Nodes like Node 1, Node 2 and Node 3 Each Node having following Slot range Node 1: 0-115 Node 2: 116-315 Node 3: 316-415 Now You can also see