Does Python scale for heavy web loads?

Drew Csillag drew.csillag at starmedia.net
Thu Sep 7 22:03:51 CEST 2000


On Thu, Sep 07, 2000 at 01:40:05PM +0000, markhaliday at my-deja.com wrote:
> Question: Using Python as a CGI and running it under Apache, would
> Python realistically be able to handle 5,000 hits an hour and not
> degrade performance?  

That shouldn't be a problem (depending, of course, on what the CGI does
and the hardware this is running on), since 5000 hist/hr is only about 1.4 
hits a second.

> With Python's threading, (ex: using a Default.py
> script as an example) I call Default.py to render some information,
> only one thread runs Default.py right?  No other people can hit
> Default.py until Default.py finishes with its original request and
> serving the information back...Correct?

No.  Actually threading plays no part in this if I understand you correctly.
If you want to serialize the calls to Default.py, you have to do some sort
of locking in the CGI script itself to make sure that no more than one of
them are doing any processing at one point.

Hope it helped!
Drew 

-- 
print'e=%s'%(lambda x:'%s.%s'%(x[0],x[1:-1]))(str(reduce(lambda
(a,b),y,z=10L**1835:(a+z/b,b*y),[[0L,1L]]+range(1,752))[0]))





More information about the Python-list mailing list