Is uwsgi protocol faster than http protocol?

谁说胖子不能爱 提交于 2019-12-09 04:18:06

问题


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?


回答1:


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/



来源:https://stackoverflow.com/questions/11783907/is-uwsgi-protocol-faster-than-http-protocol

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!