Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
gevent vs gevent_wsgi vs gevent_pywsgi workers #305
Sorry to bump a 7 year old issue, but I was recently stuck with this same question for about a week.
I think that better documentation should be made for these 3 worker types.
Short summary of the week: I was experiencing identical performance for the sync and gevent workers, which was really confounding me. After looking at the source code, I discovered the gevent_pywsgi type which dramatically increased my performance.
Just curious, what is the purpose of the gevent worker option?
The rest is as described in the comment above. The regular
If you find that
You may want to try the
To patch the blocking I/O functions of the standard library to use the gevent hub and handle concurrent requests in greenlets. If you need to handle a high volume of concurrent requests and your application performs a lot of waiting on I/O (database, streaming responses, upstream requests, etc) then
I was looking to improve throughput on a basic Flask
Could you clarify the following for me? I'm still a bit confused.:
What do you mean by
A basic hello world application is unlikely to see any performance improvement from gevent, especially if the benchmark is run locally or on a high performance network. The reason for this is that gevent only switches greenlets when performing I/O operations that would block. If you can receive the entire HTTP request in a single
The Gunicorn parser code is in