-
Notifications
You must be signed in to change notification settings - Fork 92
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
Performance comparison #81
Comments
I don't know why Nodejs implementation is so much faster, I compared only
And finally, my personal goal is to make it possible to return response in a sub-millisecond time, it is already possible with |
Please don't get me wrong, I am super happy that this project exists. I don't understand why the I just wanted to make sure that we are not using it wrong. But I didn't see that you have your own benchmarks already and I know understand more. I checked some more benchmarks from the gRPC people and it's always slowest in Python. Of course this doesn't tell us much, since the application logic is usually slow (waiting for database etc). In my case though, I am just listening on a socket and whatever comes in needs to be forwarded (without much processing), so the faster the better. Thanks for giving me this info! Very helpful. Best, |
Seams like @grpc folks already started to work on asyncio support:
Maybe you need some sort of a proxy server? Something like Envoy or Nginx? gRPC is based on HTTP/2 and any HTTP/2-capable server (there are tons of them) can be used for this (routing, filtering, auth, retries, ...). |
@vmagamedov, since you've researched |
@vagarkav There are no blocking sync calls with a thread-pool under the hood, so their asyncio support is as good as possible. But it would be great to understand how
|
@vmagamedov, thank you very much, you saved me a week! It's interesting that while using threads |
In case anyone else bumps into this issue too and wonders how the performance of grpclib is compared to grpcio nowadays, at the time of writing, and according to my tests, grpclib is 2 times faster than grpcio in CPython. Here are the benchmarks I crafted to test this: https://github.com/llucax/python-grpc-benchmark. |
Hi guys,
I found this library because we are experimenting with gRPC in our company. I love Python, but I am quite new to the
asyncio
world of it. I executed the helloworld proto example withgrpclib
as the only library supportingasyncio
and I was wondering about the performance of it. We are getting 2500 req/s using this library.With NodeJS we are getting 17000 req/s on our developer machines.
This shall not end in a comparison of python vs node or anything faster, I really want to stick with Python (and use FastAPI + Starlette as framework), but wanted to checkin first, if we are doing something wrong with this library.
Thanks in advance,
Amir
The text was updated successfully, but these errors were encountered: