WSGI vs uWSGi with Nginx

fear_matrix picture fear_matrix · Oct 12, 2011 · Viewed 56.1k times · Source

Could anyone please explain pros/cons when using WSGI VS uWSGI with Nginx.

Currently i am building up a production server for the Django website which i have prepared but unable to decide whether should i go with WSGI or uWSGI. Could you please explain in detail what differentiates each configuration? Which configuration should scale the best?

Thanks in advance

Answer

Derek Litz picture Derek Litz · Jan 1, 2012

Ok, guys this confusion is because of lack of detail from several sources, and the naming of these protocols, and what WSGI actually is.

Summary:

  1. 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.
  2. 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 web server, if you weren't confused enough already!).
  3. Comparing uwsgi to WSGI is comparing oranges to apples.