把nginx放在uWSGI前面有什么好处?
What's the advantage of putting nginx in front of uWSGI?
我看到很多人 运行 使用 nginx 安装他们的 python 应用程序,然后与 nginx 通信。 uWSGI可以运行直接作为web服务器,而且看起来还挺快的,可扩展的,那么把nginx放在前面的目的是什么?
uWSGI documentation 回答了这个问题:
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).
我看到很多人 运行 使用 nginx 安装他们的 python 应用程序,然后与 nginx 通信。 uWSGI可以运行直接作为web服务器,而且看起来还挺快的,可扩展的,那么把nginx放在前面的目的是什么?
uWSGI documentation 回答了这个问题:
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).