What are the benefits of running uWSGI in master mode if I'm only running a single app? Does master mode offer process management benefits that make it more reliable than, say, running via Upstart?
harakiri. A feature of uWSGI that aborts workers that are serving requests for an excessively long time. Configured using the harakiri family of options. Every request that will take longer than the seconds specified in the harakiri timeout will be dropped and the corresponding worker recycled.
Nginx implements a uwsgi proxying mechanism, which is a fast binary protocol that uWSGI can use to talk with other servers. The uwsgi protocol is actually uWSGI's default protocol, so simply by omitting a protocol specification, it will fall back to uwsgi .
Can I then ditch NGINX? uWSGI could be used as a standalone web server in production, but that is not it's intentional use. It may sound odd, but uWSGI was always supposed to be a go-between a full-featured web server like NGINX and your Python files.
Remember: lazy-apps is different from lazy, the first one only instructs uWSGI to load the application one time per worker, while the second is more invasive (and generally discouraged) as it changes a lot of internal defaults.
upstart is only a process manager, the uWSGI master has access to lot of memory areas of workers (well it is the opposite indeed) so it can make truly monitoring of the behaviour of workers, in addition to this it allows graceful reloading, exports statistics and dozens of other things. Running without it is not a good idea from various point of views.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With