Jedis Cluster Support - JedisClusterNode or ShardedJedis

602 views
Skip to first unread message

Sandeep Paliwal

unread,
May 7, 2015, 7:45:45 AM5/7/15
to redi...@googlegroups.com
The latest version of Jedis has support to connect with Redis Cluster. 
There is not much documentation available as to which is better way to connect to cluster. Should I use JedisClusterNode or ShardedJedis?
Which one of them can handle redirections and do I need to handle any nodes going down in my client code or its all managed transparently by Jedis client lib?

Any help or info or code examples around this will be much appreciated.

thanks,
Sandeep

Tyler Blair

unread,
May 11, 2015, 9:54:33 AM5/11/15
to redi...@googlegroups.com
You want JedisCluster to conncet w/ Cluster, see https://github.com/xetorthio/jedis#jedis-cluster for examples on how to use it.

ShardedJedis is for application-level sharding and is not for Cluster. It does not support transactions, pipelining, etc (at least, unless you know all keys go to the same shard.)

Regards,
Tyler
Reply all
Reply to author
Forward
0 new messages