Score:0

What's the advantage of uwsgi protocol over http for Apache proxying?

us flag

I've just set up a couple of WSGI apps behind an Apache server proxying to uwsgi using UNIX sockets on the same host. The generally advertised method to do that seems to be like this:

Apache config:
ProxyPass / unix:/var/lib/uwsgi/app1.sock|uwsgi://uwsgi-uds-app1/

uwsgi .ini
socket = /var/lib/uwsgi/app1.sock

I've done it a bit differently:

Apache config:
ProxyPass / unix:/var/lib/uwsgi/app1.sock|http://127.0.0.1/

uwsgi .ini
http-socket = /var/lib/uwsgi/app1.sock

So basically in my setup Apache and uwsgi talk back and forth using http instead of uwsgi's native protocol. To me the advantages are that I save one extra dependency (mod_proxy_uwsgi), and that it was easier to debug the whole setup by being able to directly talk to the uwsgi server using curl --unix-socket

So what is the advantage of using the uwsgi protocol? If it's only about performance -- no issue for my low-volume applications.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.