Comments (8)
We do have plans to support EVAL.
But before we support EVAL/EVALSHA, we need to support #9. This is because, if sharding is done on the "keynames", we would require all the "keys" in EVAL command to map to the same server. Unlike mget and del, we cannot fragment EVAL command.
what do you think?
from twemproxy.
It makes a lot of sense.
Thanks
Javi
from twemproxy.
we have 'hash tags' now on head. so this should be easy to support
from twemproxy.
+1 For this feature
from twemproxy.
Hi manjuraj,
I have written a patch that provides rudimentary EVAL/EVALSHA support for scripts that take exactly one key. I can expand that to more generic support, but I wanted to know if you had any thoughts about how that should look like.
Specifically:
- The sharding algorithm (or even the characters that determine the hash tag part of a key) isn't known in the redis protocol parser (nc_redis.c). We either have to expose this to the parser, or we have to expand struct msg to hold multiple keys so that either the parser or server_pool_conn() can determine if the query is well-formed. Do you have an opinion either way?
- Do we support EVAL of scripts that take 0 keys (e.g. EVAL "return 0" 0) - should we execute this on an arbitrary server, or make it mandatory for at least 1 key to be provided even if the script doesn't use the key so the server the script is executed on is deterministically picked?
Thanks
from twemproxy.
@ferenyx send a pull request :)
I think for EVAL and EVALSHA commands taking >= 1 key, we should do sharding on the 1st key with the hope that client uses 'hash tags' and has the same hash tag for all the keys in the EVAL and EVALSHA command.
See #54 (comment) for more discussion on this
from twemproxy.
I sent a pull request, and that's now at issue #60. Thanks!
from twemproxy.
Fixed by @ferenyx. See: 4e117f8
from twemproxy.
Related Issues (20)
- Cross Region Replication Support HOT 1
- Monotonically Increasing CPU usage for redis proxy HOT 3
- Twemproxy does not release memory for mbufs: Free list garbage collection approach HOT 1
- Not working redis-sentinel-feature HOT 2
- Building release 0.5.0 on OpenBSD 7.0 fails with `ld: error: undefined symbol: backtrace` HOT 1
- we have Redis Cluster ,what's twemproxy usage for Redis now?
- add HRANDFIELD HOT 5
- twemproxy支持blpop指令么? HOT 2
- Question: Can we pass/upload configuration file through web browser?
- error logs: NC_ request HOT 2
- possible bug in slots count reported in verbose logging statement HOT 1
- Q: still copy after each msg_parsed?? HOT 1
- memcached replication (with consistant hash) HOT 2
- Do not ship/install "test_all"
- Murmur implementation is not endian/alignment-neutral
- Getting error "" Redis connection lost and commands aborted in uncertain state. They might have been processed."'
- nutcracker sets umask only upon daemonization HOT 1
- fuzzing integration in oss-fuzz HOT 1
- 这个工具支持 redis 双向实时同步吗? HOT 1
- How to open HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twemproxy.