twitter / twemproxy

A fast, light-weight proxy for memcached and redis
Apache License 2.0
12.15k stars 2.06k forks source link

redis script command support #677

Open lukemakeit opened 1 year ago

lukemakeit commented 1 year ago

Problem

redis script command not support.

Solution

Send the script command to all Redis servers for execution, and get one of the results and return it to the user client.

Result

> script load "return redis.call('hset',KEYS[1],KEYS[1],KEYS[1])"
"dbbae75a09f1390aaf069fb60e951ec23cab7a15"
> script exists dbbae75a09f1390aaf069fb60e951ec23cab7a15
1) (integer) 1