Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is uwsgi protocol faster than http protocol?

I am experimenting with various setups for deploying django apps. My first choice was using a simple apache server with mod_wsgi, which I had implemented before for private use. Since the current deployment is for public use, I am looking at various options. Based on the information available online, it seems it is good to have nginx for serving static content as well as a reverse proxy for a dynamic content server. Now given my previous knowledge of Apache I was considering using the same for dynamic content. But then I came across Gunicorn and later uWSGI. Currently I am implementing uWSGI. I see that it allows multiple protocols including http.

What are the advantages of using one protocol over the other. I understand that given my requirement of scaling the app over multiple servers, means that I cannot use Unix sockets, which seem to be recommended in some tutorials. So the other choices are TCP socket with uwsgi or with http. Do they have much theoretical difference. I am not aware of the details of uwsgi protocol and would like to know, if using it over http protocol would make things faster?

like image 245
Vipul Patil Avatar asked Aug 02 '12 18:08

Vipul Patil


1 Answers

Ultimately your bottlenecks are not going to be in the particular routing mechanisms for requests unless you really muck up the configuration. So arguably a waste of time to be focused too much on basing decisions on things at that level.

Go watch my talk from PyCon for some context on where bottlenecks are really going to be.

http://lanyrd.com/2012/pycon/spcdg/

like image 181
Graham Dumpleton Avatar answered Oct 14 '22 15:10

Graham Dumpleton