Hey there guys, firstly thanks for your awesome framework! 馃槃
I've been benchmarking Falcon on my end by running a WSGI server and using wrk to run some tests against a 'Hello world' endpoint.
What I'm finding is that CPython with gunicorn and Meinheld workers is by far the best option. I have tested out PyPy with uwsgi and gunicorn (with various types of workers) and can't get anywhere near the performance.
I have run your suite of benchmarks and can indeed replicate the incredible performance under PyPy but I wonder if the benchmarks are a bit unrealistic in the real world due to the omission of a WSGI server serving the traffic.
Are there any suggestions you have about getting the absolute best performance via PyPy and Falcon when serving via a WSGI server? Which server do you suggest and are there any recommended settings to squeeze every last bit of juice out of PyPy and Falcon?
Thank you so much!
Fotis
Hello Fotis!
And thanks for the tips on https://github.com/falconry/falcon/issues/462 !
There is an in-progress pull request https://github.com/falconry/falcon/pull/1280 by @nZac for https://github.com/falconry/falcon/issues/462, however we have reduced its scope to NGINX+uWSGI for now to quicker get something usable out.
PyPy+Gunicorn documentation has been split out to a new issue: https://github.com/falconry/falcon/issues/1369 . Needless to say, contributions are very welcome on that one :slightly_smiling_face:
Hi again @fgimian ,
I am going to close this issue by merging it with the mentioned #1369 .
I have run your suite of benchmarks and can indeed replicate the incredible performance under PyPy but I wonder if the benchmarks are a bit unrealistic in the real world due to the omission of a WSGI server serving the traffic.
A word on benchmarks. It is true that they are not representative of a "real" network server throughput -- the focus is instead on illustrating the overhead that different frameworks are incurring, sort of a theoretical maximum of what is possible, and when network is taken into account, the real throughput will be lower.
On the other hand, these benchmarks reflect numbers on a single vCPU core crunching Python code. Adding more worker processes on a multicore machine may actually get even higher numbers than these single-core benchmarks, as, for instance, seen on https://www.techempower.com/benchmarks/#section=data-r19&hw=ph&test=plaintext , on a physical multicore Xeon server (IIRC also using Meinheld as you suggest), one can get close to half million requests per second with Falcon.
No worries at all @vytas7, thank you so much for the information too 馃