What's the advantage of putting nginx in front of uWSGI?

狂风中的少年 提交于 2020-01-30 06:34:23

问题


I see a lot of people running their python app, with nginx, which then communicates to nginx. uWSGI can run directly as a web server, and it looks quite fast and scalable, so what's the purpose of putting nginx in front of that?


回答1:


uWSGI documentation answers this question:

Generally your webserver of choice (Nginx, Mongrel2, etc. will serve static files efficiently and quickly and will simply forward dynamic requests to uWSGI backend nodes.

The uWSGI project has ISPs and PaaS (that is, the hosting market) as the main target, where generally you would want to avoid generating disk I/O on a central server and have each user-dedicated area handle (and account for) that itself. More importantly still, you want to allow customers to customize the way they serve static assets without bothering your system administrator(s).



来源:https://stackoverflow.com/questions/35292550/whats-the-advantage-of-putting-nginx-in-front-of-uwsgi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!