lua-resty-redis
lua-resty-redis copied to clipboard
Cluster
Hi! Is it possible to implement cluster functionality to core of this library? I'm not sure if I am able to do it myself, I tried, but code looks bad and it fails sometimes.
@misiek08 I don't have the time to look into this and I'll rely on contributions :)
So we need to wait, right? :)
Yes. I have put this into my TODO list. This is indeed a good thing to have.
come on misiek08 :100:
come on
Maybe i'm wrong, but doesn't redis have builtin clustering functionality since version 3.0? Can't we rely on that?
@bjoe2k4 yes it have, but client need to implement few responses from Redis to fully support cluster. Redis have built in only semi-routing which tells client where to ask for data if client connected to wrong node at first.
Guys, there are two pull requests implementing cluster-related features on the client side. Have you checked them out? See
https://github.com/openresty/lua-resty-redis/pulls
I see only one is totally cluster-related but I don't understand a part of code there.... Looks like there are 2 hard-coded limits for cluster count (20) and nodes count in cluster (500). It looks like this pull is using one object for many cluster and I think that one "client" should be one cluster. About node count limit I think it should be done on dynamically sized array if possible.
Or Lua is better than I think and my comment it's useless :) I had half-year break in Lua and nginx-related development...
I will add this to here as a reminder that implementing a cluster support is not something that can be done ligthly, many questions needs to be answered, a lot of design decisions need to be made: https://github.com/xetorthio/jedis/issues/990#issuecomment-103393965
+1
+1
Actually there are some unofficial clients offer part of the redis-cluster support. For example, like this one: https://github.com/steve0511/resty-redis-cluster