redis-cluster client for node.js ??

1,215 views
Skip to first unread message

Plus Pingya

unread,
Aug 8, 2014, 3:41:36 AM8/8/14
to redi...@googlegroups.com
I did try https://www.npmjs.org/package/redis-cluster
I had to modify a few code to make it works. (at least, it connected successfully)
Once I tried to set() or/and get(), it returned an error: Error: MOVED 12182 127.0.0.1:7000
and no data has been added to redis

I wonder if there's any complete module redis-cluster client for nodejs that suit for redis 3.0.0beta8 where  I can immediate use,
if not, please give me some clues, so I will continue hacking it.

Cheers,
Plus Pingya 

Jawad Stouli

unread,
Aug 14, 2014, 11:39:15 PM8/14/14
to redi...@googlegroups.com
I am also looking for that.

Meanwhile and according to the spec (http://redis.io/topics/cluster-spec), the error message that you get means that the key has been moved to a different Redis node. You should then re-send the same command to that other node and also update the cached cluster topology.

pl...@avalable.com

unread,
Aug 15, 2014, 4:53:37 AM8/15/14
to redi...@googlegroups.com
I end up myself hacking redis-cluster package, I forked its git to mine and modified a few line of codes, and now it works just great for me!

pl...@avalable.com

unread,
Aug 15, 2014, 5:07:37 AM8/15/14
to redi...@googlegroups.com
For the error message, there is nothing wrong with redis-server, but crc16 function (in redis-cluster package) was mod with incorrect number (4096), hence it returned an incorrect slot and node.

I forked the repository of the package and did some change here, it works for me now!

严清

unread,
Mar 8, 2015, 2:19:55 PM3/8/15
to redi...@googlegroups.com
thunk-redis: https://github.com/thunks/thunk-redis/tree/cluster
implemented for redis v3.0.0

在 2014年8月8日星期五 UTC+8下午3:41:36,Plus Pingya写道:
Reply all
Reply to author
Forward
0 new messages