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

  1. redis cluster not support pipeline
  2. i can not achieve high availability , automatic fail on without sentinel
  3. 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 or exec) 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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -