I noticed that you can run multiple processes on the same uWSGI instance for nginx:
uwsgi --processes 4 --socket /tmp/uwsgi.sock
Or you can run multiple instances of uWSGI on different sockets and balance the balance between them using nginx:
upstream my_servers { server unix:///tmp.uwsgi1.sock; server unix:///tmp.uwsgi2.sock;
What is the difference between these two strategies and one is preferable over the other?
How is load balancing performed by nginx (in the first case) different from load balancing performed by uWSGI (in the second case)?
nginx can manage servers on multiple hosts. Can uWSGI do this in one instance? Some uWSGI functions work in only one uWSGI process (i.e., in shared memory / cache)? If so, it can be difficult to scale from the first approach to the second ....
nginx uwsgi
user202987
source share