-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redis cluster client #45
Conversation
@h4lflife Thank you for the contribution! I really appreciate it :) I'll look into your patch when I have some spare time. Been busy with $work lately, sorry :) Thanks again! |
It's old pull request but I have question, because I don't know if I understand your code correctly. You have hard-coded limit for max. 20 clusters and 500 nodes in each cluster, right? Or is Lua allocating space for 20 and 500 entries and if we exceed that it's allocating bigger memory space? If yes (there are limits), I think one call for your code should be one cluster, and the nodes should be stored in dynamically sized array. |
@zhduan My hunch is that it's better to be implemented in a separate wrapper library, in the same spirit of @pintsized's lua-resty-redis-connector |
["shutdown"] = true | ||
} | ||
|
||
local band, bor, bxor = bit.band, bit.bor, bit.bxor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi,i'm a newer of github,when i use your redis_cluster, i met a problem at this line:attempt to index local 'bit' (a boolean value), i'm wondering how to solve this problem,can you help me? thanks a lot!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have solved my problem. it's my own mistake.Now i'm using redis_cluster with redis3,0.1 and it works pretty well.
thanks for implementing it, but i have a problem that whether there are connection pool in your code? |
|
||
local cluster_slots = cluster.slots | ||
|
||
for slot_index = 9, #fields do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here,if the slots in one node is 0-1665 5461-7127 10923-12588, there will be some lose slots when add slot cache
Whether to support password access? |
@agentzh 请问怎么配置验证密码 |
@wjs57y Please, no Chinese here. This place is considered English only. It is especially rude to reply to an unrelated pure English issue thread. If you really |
Here is my error msg : Uninitialized cluster. I follow the Example, what`s wrong? Is there anyone have a same problem? |
Redis cluster client.
This is implementated as a wrapper over the existing resty-redis client adding cluster functionality. Basic functionality except pipelining is working. Working on pipelining support.
ref: https://github.com/antirez/redis-rb-cluster
Example:
Open Issues:
Please review and let me know of any comments.