gpt4 book ai didi

python - 把nginx放在uWSGI前面有什么好处?

转载 作者:行者123 更新时间:2023-11-28 22:38:53 27 4
gpt4 key购买 nike

我看到很多人使用 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).

关于python - 把nginx放在uWSGI前面有什么好处?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35292550/

27 4 0