Open Fry-kun opened 11 years ago
lua-redis-parser does not support recursive multi-bulk replies yet. You're recommended to use lua-resty-redis for it.
BTW, you can also use lua-resty-redis for multiple node sharding. Just calculate the target from a list of servers that you want to connect to in your own Lua code. And you can also make them share the same connection pool if you want.
yeah, that's what I figured... but was trying to avoid re-setting up the sharding in resty guessing no plans to implement recursive multi-bulk replies any time soon?
I don't have the time to implement recursive multi-bulk reply support in lua-resty-parser right now. You're welcome to submit a patch though :)
fair enough :)
...or what I assume is a multi-bulk reply
Request command is EVAL, put together with redis.parser.build_query res = ngx.location.capture tells redis2 location that it's 1 query (also tried 2)
redis-lua returns following (tcpdump):
2 0 :1
First result is an empty zset result, 2nd is an integer... When I print out res, it's
unnamed = { ["status"] = 200; ["body"] = ""; ["header"] = { ["Content-Type"] = "application/octet-stream"; }; ["truncated"] = "false"; };
Redis commandline client says
1) (empty list or set) 2) (integer) 1
I'd try resty-redis, but I need nginx to shard the queries across multiple redis servers