brandur/redis-cell

redis-cell support cluster?

cnsky2016 opened this issue · 6 comments

hi,i want to know redis celll support redis cluster? according to https://redis.io/topics/modules-api-ref, i not found "getkeys-api" in your code.

Hi @cnsky2016, unfortunately I don't have a good answer here — I don't think there any blockers to get it going on Redis Cluster, but I'm not sure about that.

according to https://redis.io/topics/modules-api-ref, i not found "getkeys-api" in your code.

Reading through the module docs, I don't think we need getkeys-api:

"getkeys-api": The command implements the interface to return the arguments that are keys. Used when start/stop/step is not enough because of the command syntax.

As of @xiezhenye's change yesterday in #29, we now correctly pass keystart/keystop/keystep, and because the command interface is relatively simple, I think those are enough and no more advanced keys interface is required.

(That said, I haven't tested.)

Hi, I have been trying to get this module working in a cluster. Unfortunately even after @xiezhenye's changes I wasn't able to to get the module working in a cluster. Once I added a call to 'replicateVerbatim' I was able to get the module to work as expected in a cluster - although this led to problems with the StackExchange client i'm using, since the client wasn't being made aware of the key it was unable to determine which node to select

Thanks @profporridge.

although this led to problems with the StackExchange client i'm using, since the client wasn't being made aware of the key it was unable to determine which node to select

Is there something in the client that can be fixed there? I'm not sure I completely understand, but it seems like the interface might need to be tweaked so that it knows which arguments are keys when invoking custom commands.

The client needs to know what the key is so that it can determine which node to run the command on. It's entirely a client problem.

The client needs to know what the key is so that it can determine which node to run the command on. It's entirely a client problem.

Both client and server should know which arguments are keys.

After server command info fixed, redis-cell can work correctly with redis-cli and Jedis.

After server command info fixed, redis-cell can work correctly with redis-cli and Jedis.

Excellent!