-
Notifications
You must be signed in to change notification settings - Fork 2k
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
SCRIPT LOAD support #68
Comments
Yes that seems like one possible way to do it. Alternatively for commands that aren't key-specific we could execute them outside twemproxy. For example the "SCRIPT LOAD" command can be executed by an external proces on all the redises since it is not a command that you would run really frequently |
This would be extremely useful. Right now we do client side sharding, and we have a lot of Lua scripts. On deploy we Is anyone working on this? If not I can take a look. |
do you scripts change over time; if they don't they you can just load the script once on all redises and use EVALSHA |
They don't change every day, but fairly often, and new ones are added regularly. Right now we have 128 instances, so it would be nice to be able to load a script with one command through nutcracker rather than having to manage the server configuration in multiple places. It would also be nice to be able to easily RUN a script on each instance. A simple example would be a script that runs |
Are there any commands currently that behaves like this? I mean, you send the command to twemproxy and it forwards the command to all the servers in a pool. |
Because when redis restart, script sha cache is cleared anyway, so i think any decent redis client should be able to handle this already. So just send script command to any shard is ok. edit: my mistake, it need to be sended to all servers eventually, currently command without keys is only be sended to one server. |
Did anyone ever get anywhere with this, we are considering using twemproxy and having to manage lua scripts separately is definitely a big negative |
@shmish111 hi, I have tackled this issue. but does not have enough confidence (only 1day code reading of twemproxy :<). can you test my fix? |
@umegaya that's awesome however at the moment I don't even have twemproxy installed, I was at the product evaluation stage when I saw this issue and asked as it is vital for our current setup. I will try to get it installed and test with the scripts that I intend to use however I don't know when I will have time. Can anyone else on this thread test it? |
It seems like it'd be a reasonable implementation to have any SCRIPT LOAD get sent to all servers. Possibly other commands that aren't key-specific as well.
Am I missing something or is this a reasonable idea that could be accepted as a PR?
The text was updated successfully, but these errors were encountered: