NGINX + Flask, without Gunicorn? NGINX + Flask, without Gunicorn? flask flask

NGINX + Flask, without Gunicorn?


Werkzeug can use multiple processes, but spins up a new process on each request. That's great if you're slapping something together that so thoroughly pollutes its environment that discarding the process after each request is necessary, but isn't the most performance-friendly approach to deploying an app.

gunicorn (or uwsgi, which I prefer) provides process management that's considerably more flexible than what Werkzeug provides.

You might be convinced, though, by throwing together a simple app, setting it up for 4 processes using werkzeug for one experiment, and gunicorn or uwsgi for the other, and then measuring its performance as you throw traffic at it.