I’ve fallen in love with mod_wsgi

I think that I am about to embark on a long term relationship with mod_wsgi. It is a huge improvement over mod_python for deployment of CherryPy on the basis of performance, flexibility and simplicity.

There are some benchmarks on the site showing that mod_wsgi is slightly faster than mod_python but it also allows finer control of the Python software so I can do things like share a cache more easily which will have a much bigger performance impact.

It was wonderfully simply to setup — the only gotcha for me was that I needed to add a sys.path.append(’/path/to/script.py’) to get my imports working properly.

I also really like the depth and detail of the documentation and the maintainer is very active and very helpful.

My initial results have been brilliant, I’ve now got a test version of the site up and running which is absolutely leaving the original (mod_rewrite) in the dust in terms of speed. I’ve still got a little bit more work to do on the SQLObject -> handcrafted SQL to finish and then I’m there. Hopefully I’ll get it released this weekend.

Leave a Reply

You must be logged in to post a comment.