Ian Bicking: the old part of his blog


IMO, FastCGI is an ideal solution, and I've actually used it for running Python apps serving millions of dynamic hits per month. (And could easily have scaled it much further by adding hardware).

The advantage of FastCGI is that your application runs in a separate process than the web server, so you can scale it differently in terms of the ideal number of processes. You're not consuming huge amounts of memory due to having dozens of Apache processes each with a copy of your app, if you only need maybe five copies of your app running to handle the load. So, for complex applications I would choose FastCGI over mod_python for those reasons.

(Also, by appropriate use of forking, a FastCGI application can have very fast startups for additional copies of the application, and can kill them off when not needed. PEAK includes a "process supervisor" tool that manages this, by listening to the same socket and keeping track of which child processes are busy.)
Comment on An Ideal Python Web Programming Environment
by Phillip J. Eby