Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the uWSGI master process for?

Tags:

uwsgi

What is the uWSGI master process for?

and/or where can I read more about it?

I have found zero documentation for it.

like image 370
John Bachir Avatar asked Jan 28 '16 21:01

John Bachir


People also ask

What is uWSGI used for?

uWSGI is an open source software application that "aims at developing a full stack for building hosting services". It is named after the Web Server Gateway Interface (WSGI), which was the first plugin supported by the project.

Can I use uWSGI without nginx?

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.

What is lazy apps in uWSGI?

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.

How many employees does uWSGI have?

This configuration will tell uWSGI to run up to 10 workers under load. If the app is idle uWSGI will stop workers but it will always leave at least 2 of them running. With cheaper-initial you can control how many workers should be spawned at startup.


1 Answers

You can find some information about master here and here

Generally speaking, master file is responsible for graceful reloading your app server (so there is as little as possible down time when you're reloading your app), it manages preforking and enables threading for app instances. It also manages some advanced logging features and keeps your app instances up and running (when one of instance crashes, master will re-launch it). It probably also manages harakiri mode (it kills hanged workers).

Generally speaking, using master is recommended for your apps, unless you're using emperor.

Running emperor (not vassals, but emperor by itself) with master process is recommended only if you need some of benefits that master gives, for example advanced logging. You can also skip master for your vassals, because emperor will do some of work that normally vassal does, but not all of it. I personally use master for vassals.

like image 145
GwynBleidD Avatar answered Nov 22 '22 14:11

GwynBleidD



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!