node-redis icon indicating copy to clipboard operation
node-redis copied to clipboard

Plan for cluster support

Open crzidea opened this issue 12 years ago • 45 comments

Is there any plan for cluster support? Redis 3.0.0 beta has been released for a month.

crzidea avatar Apr 18 '14 03:04 crzidea

:+1:

haio avatar Apr 18 '14 10:04 haio

Anyone developing this support?

asilvas avatar Jun 13 '14 03:06 asilvas

May be we have to re-build the concept of this module. Today is completly deprecated and still it is recommended by Redis.IO site.

The problem with "cluster support" is that redis still doesn't have it on stable versions. It's on development.

The appropiate issue will be "plan for redis sentinel", i think...

albarra avatar Jun 13 '14 13:06 albarra

I've made a compatible wrapper over node_redis for redis clusters: https://github.com/koyoki/redis-party

andzdroid avatar Jun 13 '14 14:06 andzdroid

@albarra -- this is not deprecated at all. Chill out -- it is maintained and we're working on updating the nature of the library to be more compatible with things like sentinel and cluster.

As mentioned in other issues, Redis Sentinel and Redis Cluster support will require removing the reconnection logic from the core of this library. There is a refactor branch where I've started that work and have been rewriting the tests in a way that doesn't also combine the tests with the connection logic.

Once that is done all connection logic (sentinel, cluster, or the existing legacy reconnection logic) will all be available as separate wrappers for this library.

brycebaril avatar Jun 13 '14 15:06 brycebaril

Sorry, what i meant is that in certain situations is deprecated, since it doesn't support HA. Of course, if you have only one instance of Redis, it's the ideal module. It works perfect! :+1: , and as you said, the module has continuous updates and support. :) greetings!

albarra avatar Jun 13 '14 15:06 albarra

@brycebaril :+1:

vivekkrbajpai avatar Oct 28 '14 22:10 vivekkrbajpai

I wrote a redis cluster implementation that is similar to Antirez's ruby version. It simply wraps this redis module but I'd like to see it included with this module if possible. The only change I had to make to redis/index.js1 was to make the raw error object get passed to the on_error method, pass that along when we emit the error, and allow RedisClient#max_attempts to be 0.

I know that @brycebaril is working on a refactor branch that removes the connection logic but I'm not entirely sure that that is required for getting cluster support. I'm sure I just missed the discussion on that but is there a summary for why?

mc0 avatar Nov 15 '14 01:11 mc0

@mc0 I guess connection shuold be keeped instead of just close it on_error.

crzidea avatar Nov 15 '14 01:11 crzidea

@brycebaril any updates regarding Redis cluster support? I read there was a refactoring going on, but didn't see any recent updates. Thanks!

danmaz74 avatar Jan 16 '15 12:01 danmaz74

+1 for cluster support

jadbox avatar Feb 03 '15 23:02 jadbox

+1

MetaThis avatar Mar 02 '15 22:03 MetaThis

Redis cluster is out now, any chance to implement support for it now?

shaharmor avatar Apr 01 '15 15:04 shaharmor

+1

thelinuxlich avatar Apr 01 '15 19:04 thelinuxlich

:+1:

alumowa avatar Apr 06 '15 19:04 alumowa

+1

sebbo2002 avatar Apr 16 '15 07:04 sebbo2002

+1

julien51 avatar Apr 27 '15 20:04 julien51

@mranney any comments sir?

genediazjr avatar Apr 29 '15 05:04 genediazjr

We (sharelatex.com) would be interested in sponsoring this feature if that helps. I am not sure how much work it would be to develop, potentially a few other companies would pitch in?

henryoswald avatar Apr 29 '15 11:04 henryoswald

There are already two alternative modules which support Redis 3.0 cluster and are better performant than node-redis:

https://github.com/thunks/thunk-redis https://github.com/luin/ioredis

I'm using thunk-redis and can confirm the cluster feature is working well

thelinuxlich avatar Apr 29 '15 11:04 thelinuxlich