Why should I use WSGI?
python, wsgi
Solution
mod_wsgi vs. mod_python:
- mod_wsgi is a little faster (internally there's more C, less Python)
- mod_wsgi processes can be isolated from Apache, which improves security/stability with lower memory use[1]
- mod_python gives you access to some of Apache's internals
WSGI in general:
- lots of reusable middleware (authentication/authorisation, session stuff, caching, filtering)
- ease of deployment on non-Apache webservers either via native WSGI support or flup
[1] - compared to a preforking Apache, which maintains a separate Python interpreter in each process
Problem
Been using mod_python for a while, I read more and more articles about how good WSGI is, without really understanding why. So why should I switch to it? What are the benefits? Is it hard, and is the learning curve worth it?