Recently I'm setting up some Python website and it seems the architecture nginx -> uwsgi -> wsgi application
is an obvious choice in Python world these days. (Actually I'm migrating a MoinMoin site backed by Apache + mod_wsgi to a newer VM running nginx so I took time to look at nginx-backed deployment possibilities.)
I've read a lot about why there needs to be such indirection layers, and I'm fully aware that the individual techniques involved - nginx, uwsgi and wsgi - are all modern, featureful of very high performance, and all mature as of today. But since in such an architecture there are 2 layers of IPC involved (nginx -> uwsgi
and uwsgi -> wsgi application
) I've been always wondering about
- how does the IPCs impact the overall performance?
- is the impact big enough to have practical implications?
I googled and found no direct answer. So is the IPC overhead small enough or just I didn't find the right keywords?
(BTW I read that Erlang community has produced several HTTP servers that take the user's HTTP request directly to the application code and also have very high performance. I googled but couldn't find a benchmark comparing these 2 approaches)