Does Python scale for heavy web loads?

Andreas Jung andreas at andreas-jung.com
Fri Sep 8 06:29:50 CEST 2000


markhaliday at my-deja.com wrote:
2qy
2qyQuestion: Using Python as a CGI and running it under Apache, would
2qyPython realistically be able to handle 5,000 hits an hour and not
2qydegrade performance?  With Python's threading, (ex: using a Default.py
2qyscript as an example) I call Default.py to render some information,
2qyonly one thread runs Default.py right?  No other people can hit
2qyDefault.py until Default.py finishes with its original request and
2qyserving the information back...Correct?

5000 hits are usually peanuts :-) The load of server depends
on your server and your Python environment. Using CGI is
old-fashioned and generates a lot of IO on your server because
the web server need to start Python for every request. Better 
solutions are:

Python + FastCGI
mod_python (Python inside Apache web server)
Zope
PCGI

When you're in Apache country then mod_python might be your choice.
It is very straight to convert a "standard CGI" to mod_python.

Cheers
Andreas



More information about the Python-list mailing list