Pylons / waitress

Waitress - A WSGI server for Python 3
https://docs.pylonsproject.org/projects/waitress/en/latest/
Other
1.44k stars 164 forks source link

Does waitress use multiprocessing? #324

Closed johann-petrak closed 3 years ago

johann-petrak commented 3 years ago

Waitress is often mentioned as the only Python WSGI server that also runs on Windows so I got interested. However it is not clear to me if waitress supports running several workers as separate processes with the ability to share some large in-memory resource as e.g. gunicorn does.

The word "multiprocessing" is not mentioned in the docs and the serve method only has a "threads" parameter which sounds like this would be threads not processes. So is it true that waitress does not support true multiprocessing and multiple cpus?

mmerickel commented 3 years ago

Waitress is a single process multithreaded wsgi server. It can be run in multiple processes but it offers no facilities to do that for you automatically.

digitalresistor commented 3 years ago

No, waitress does not using multiprocessing, it is multi-threaded. Yes, this means that it is not technically true multiprocessing due to the global interpreter lock.

This is not ever going to change.

johann-petrak commented 3 years ago

Thank you for confirming this ,which sadly means there is no Python WSGI server on Windows that can do true multiprocessing.