java - Redis Sentinel and ShardedJedis for ShardedJedisPipeline -
i using redis
in cluster mode @ production. later realised if use redis independent servers
using shardedjedis java api
, can use shardedjedispipeline
has better performance due obvious reasons. while using redis server
maintain automatic fail on , high availability, must use redis sentinel
. so, started looking sentinel
. while doing initial poc
, got know can not use shardedjedis
, sentinel
@ same time.
now seems paths closed as
redis cluster
not support pipeline- i can not achieve high availability , automatic fail on without
sentinel
- i can not use
sentinel
shardedjedis
.
please correct me if wrong anywhere , please suggest me best strategy achieve performance high availability , automatic fail over.
spoken in general terms:
- redis cluster supports pipelining same way redis standalone does. important part here hit right node when issuing commands keys. commands without keys (such
multi
orexec
) no-go redis cluster - the ha-part not 100% correct. while it's true, redis cluster has no ha-registry redis sentinel, cluster maintains topology. if using masters , slaves, it's not big deal client-failover new master. trick here is, find right moment , update cluster view accordingly.
afaik, redisson has automated topology-update mechanism. i'm not sure, whether jedis updates it's cluster view on regular basis, it's possible manually. lettuce has auto-reconnect feature , automated cluster view update scheduled 3.3 release
hth.
Comments
Post a Comment