Python for CGI is dead?

Danilo Šegan dsegan at
Tue Jan 14 16:34:46 CET 2003

Warning: I'm discussing the CGI and performance issue, so anyone not 
interested feel free to skip this. It's a bit "theoretical".

Michael Urban wrote:
 > I would argue that CGI itself is dead. Or at least it should be. It's
 > an outdated technology that is a huge performance hit on the server.
I'd have to disagree with the statement that CGI is dead. It's only an 
interface, a communication layer, and as such, is very useful.

As it is commonly used and implemented in the general case, I'd agree 
with the second part.

 > However, mod_python is very much alive (embed Python interpretor into
 > Apache to avoid starting a new copy of the interpretor each time
 > the script it run).
To argument my previos claims, surely one can extend Python standard 
module CGIHTTPServer up to the point where "starting a new copy of the 
interpretor" would be unneeded. Of course, CGIHTTPServer is already 
capable of doing so for some cases, but I don't know for sure (I don't 
actually use it). I just mentioned it as an example in support of my 
claim that CGI has nothing to do with the performance hit.

Generality which CGI provides is the advantage of it, so, when I expect 
the load to be great, I'd run my own server and configure it with either 
proposed mod_python, or I'd assemble a server which kept the 
applications running (not just Python, but my application too: that 
would improve performance even more, I suppose).

And what's else, maybe even mod_python uses CGI to communicate data to 
the application.


More information about the Python-list mailing list