Replacing nginx with uwsgi

It seems that uwsgi is able to do almost everything that I use nginx for: serving static content, executing PHP scripts, python host web applications ... So (to simplify my environment) is it possible to replace nginx + uwsgi with uwsgi without losing performance / functionality?

+6
source share
1 answer

As the documentation says :

Can I use UWSGIs HTTP features in production?

If you need a balancer / proxy, this can be a very good idea. This will automatically detect new instances of uWSGI and can load balance in various ways. If you want to use it as a real web server, you must have an account serving static files in uWSGI instances, but not as well as using a dedicated full-featured web server. If you accept static assets in the cloud or on a CDN using uWSGIs HTTP, you may not be able to configure a complete web server.

So uWSGI is slower than a traditional web server.

In addition to performance, you're right in a truly basic application, uWSGI can do whatever the web server offers. However, if your application grows / changes over time, you may find that there are many things that a traditional web server offers that uWSGI does not.

I would recommend setting up deployment scripts in your language of choice (e.g. Fabric for Python). I would say that my web server is one of the simplest components to deploy and configure on the application stack, and the least “needy" one is rarely on my radar if I am not setting up a new server.

+4
source

Source: https://habr.com/ru/post/975203/


All Articles