2 Notes
+ WSGI, uWSGI, uwsgi (Oct. 15, 2019, 1:04 p.m.)

WSGI and uwsgi both are protocols, not servers. It is used to communicate with web servers for load balancing and especially to take advantage of extra features that pure HTTP can not provide. So far Nginx and Cherokee have implemented this protocol. uWSGI is a server and one of the protocols it implements is WSGI (do not confuse the uwsgi protocol with the uWSGI server). WSGI is a Python specification. There are several implementations of the WSGI specification and it's intended to be used for more than just application servers/web servers, but there are quite a few WSGI application servers (ie. CherryPy, which also happens to have a production-ready WSGI compliant webserver). Comparing uwsgi to WSGI is comparing oranges to apples. --------------------------------------------------------------- It is generally best to run Python in a separate process from your main web server. That way, the web server can have lots of tiny threads that serve static content really fast, while your separate Python processes will be big and heavyweight and each is running their own Python interpreter. So plain WSGI is bad because it bloats every single one of your nginx threads with a big Python interpreter. Using flup or gunicorn or uWSGI behind nginx is much better because that frees up nginx to simply serve content, and lets you choose how many tiny light nginx threads to run, independently of your choice of how many heavyweight Python threads you bring up to serve dynamic content. People seem very happy with gunicorn at the moment, but any of those three options should work fine. ---------------------------------------------------------------

+ Build binary files (Feb. 5, 2016, 2:40 a.m.)

1- apt install python-dev python3-dev 2- Download the uwsgi tar file: http://projects.unbit.it/downloads/uwsgi-lts.tar.gz 3- sudo /usr/local/bin/python3.7 uwsgiconfig.py --build core 4- sudo /usr/local/bin/python3.7 uwsgiconfig.py --plugin plugins/python core py37 5- Copy the binary files to these locations: cp uwsgi /usr/local/sbin/ cp py37_plugin.so /usr/local/lib/