Skip to content Skip to sidebar Skip to footer

Difference Between Uwsgi Module In Nginx And Uwsgi Server

I'm new to linux development. I'm a bit confused on the documentation i read. My ultimate goal is to host a simple python backed web service that would examine an incoming payload,

Solution 1:

You're mixing up things, so let me clarify.

Python's standard way of publishing applications via web servers is WSGI--you can think of it as a Python's native CGI. uWSGI is a WSGI-compliant server that uses uwsgi protocol to talk to other uWSGI instances or upstream servers. Usually the upstream server is nginx with HttpUwsgiModule that allows it to communicate using uwsgi protocol--with nginx you have additional layer of protection for your app server, load balancing and serving the static files. In most scenarios, You Should Be Using Nginx + UWSGI. To answer your question, uWSGI is installed and run separately from nginx, and they both need to be configured to communicate to each other.

Pure WSGI is pretty low-level, so you may want to use a WSGI-compliant framework. I guess the top two are Django and Flask.

For a hello world Flask setup, Serving Flask With Nginx seems to be a good article.

Post a Comment for "Difference Between Uwsgi Module In Nginx And Uwsgi Server"