twemproxy
twemproxy copied to clipboard
redis scan command support
Problem
redis scan command not support.
Solution

Note:
server_idx
is saved by the lowest 12 bits of cursor, so the number of servers of the twemproxy must be less than 4096.
Result
1.1.1.1:60100> scan 0
1) "1"
2) 1) "d"
2) "b"
3) "c"
4) "a"
1.1.1.1:60100> scan 1
1) "0"
2) 1) "a"
2) "b"
Hi @wy-ei , I have re-committed according to your suggestion, thanks.
@lukexwang
I have see the change you made. it's better. And I think the code can be optimized again. I have leave some more suggestions.
Hi @wy-ei , thank you for your suggestion. I have re-committed.
Hello @wy-ei , 空了辛苦看下哈 ^_^
马晓栋已经收到您的来件,谢谢!