What benefit is added by using Gunicorn + Nginx + Flask? [duplicate] What benefit is added by using Gunicorn + Nginx + Flask? [duplicate] flask flask

What benefit is added by using Gunicorn + Nginx + Flask? [duplicate]


I think you may be confused, Flask is not a web server, it is a framework and needs some sort of web server, such as Gunicorn, Nginx or Apache, to accept HTTP requests which it will then operate on. The reason why people run Nginx and Gunicorn together is that in addition to being a web server, Nginx can also proxy connections to Gunicorn which brings certain performance benefits, here is a pretty good answer that elaborates on those benefits:https://serverfault.com/questions/220046/why-is-setting-nginx-as-a-reverse-proxy-a-good-idea

EDIT:Added link containing information about performance benefits of running Nginx as a proxy.