-
Notifications
You must be signed in to change notification settings - Fork 7
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
Why not use https://github.com/andymccurdy/redis-py? #2
Comments
Hey, the above lib has some design flaws
with redis cluster & many clients, reaching this 1024 FD limit, will become a serious problem.
this will delay execution of redis command, until the pipelined commands get "executed" if you check redis pipeling documentation here: you will find that pipeling should work like this: you send a number of requests directly to redis, and you delay fetching of the results, and you should also take care of not having to much commands in the pipe, not more like 100 or something like this: so you have no real pipeling with redis-py. at least, not how it was intended to work.
*. there have also been some other things that did not look that appealing to me, as far as i remember, there have also been some strange decisions in the PubSub client, that i did not feel comfortable with. the other thing is that i was curious, on how hard it could be to write a redis client implementation. besides this, this client is also twice as fast doing simple set & get commands, but is guess this will most of the time never be a problem. hope this answers your questions. |
Interesting, I wasn't aware of those issues, thank you for taking time to respond in detail! |
Can you share the benchmark? I'm evaluating using this lib instead of redis-py, and was thinking of doing a small speed test, but given you seem to have done it yet ;) |
hey, seems like this is something i have to correct. at least i am not able to get the 2x improvement (not close to): here is the setup: redis running on the same host as the client. doing 1000000 sets, gets & deletes, using python 3.5.1.: without hiredis: with hiredis: but at least it is still a little bit faster. what i also notices is that on my machine, the redis client was taking most of the time something around 90% CPU, while pyredis was something around 80% CPU usage. but feel free to test for your own, speed will vary depending on key length, data length and what commands are used. here is the script i used for doing the benchmark: https://gist.github.com/schlitzered/191be6cba050d77d283db366abc47a73 |
Any reason why there is a need for another Python Redis library? Defacto standard is https://github.com/andymccurdy/redis-py
The text was updated successfully, but these errors were encountered: