[nycbug-talk] Django Web Framework

Aleksandar Kacanski kacanski_s at yahoo.com
Wed Jul 4 22:50:48 EDT 2007

I found personally that apache if configured properly proxy_pass just fine python and java applications within high load. There are issues, but depending on the app business logic and infrastructure architecture  you might be better with different lighter implementations of the http/proxy app stack. I also used apache with and without "keep alive" and again ran it just fine under both light, simulated high and prod concurrent traffic.
Aleksandar (Sasha) Kacanski

----- Original Message ----
From: Jonathan Vanasco <nycbug-list at 2xlp.com>
To: NYCBUG List <talk at lists.nycbug.org>
Sent: Tuesday, July 3, 2007 12:54:27 PM
Subject: Re: [nycbug-talk] Django Web Framework

On Jul 2, 2007, at 8:15 PM, michael wrote:

> First.. what happened to good 'ol Perl?  [grin]

still very active.  mod_perl still dominates the ecommerce enterprise  
market and many of the top visted sites.  and to be nycbug related...  
all the IAC properties ( ticketmaster, evite, etc ) run perl on a  
freebsd server farm.  freebsd is actually the only quasi-officially  
supported platform for mod-perl/libapreq -- one of the core devs  
ports new releases to the ports tree as soon as they're released.   
none of the other operating systems get that :)  i think the closest  
is CentOS which is only 2 versions behind the current.

> Django, Turbogears, and Pylons are *some* of the top choices.   
> There is
> ....
> Also.. reading up on WSGI, python's "Web Server Gateway Interface"  
> is suggested.

all those apps were migrating to WSGI middleware spec last time i  
touched them...

> (or whatever port you choose) and have Apache proxypass
> requests.  This is REALLY flexible when scaling. Apache can do what
> it is good at: handling traffic.  One could see redundant Apaches,
> passing to redundant webapp servers behind the firewall.. with
> potentially redundant database servers.

thats wrong.
apache is f***ing awful at handling traffic.  you'll hit a huge  
bottleneck in your system if apache is proxypassing to everything else.
run something like nginx , lighttpd , squid, or any of the other  
micro-servers / proxy servers.  they're built for handling traffic.
apache is built for getting http done right -- no one comes close to  
it being correct and stable like that, but it does so at the cost of  
speed and memory.

apache dies under high concurrency though.  there have been tons of  
keepalive issues too.  unless you're using apache for a specific   
apache feature, you're best off staying away.

> Of course you could remove Apache all together and go lighty!
not if you're proxying.  unless they fixed that damn memory leak  
finally-- i was reporting it every day for 2 months, and it never got  
fixed.  i recall bob was leaking 60mb an hour on mochimedia or  
something stupid big like that.  i just don't trust lighty-- i mean  
its written by a mysql dev in his spare time ! (though jan might be  
the smartest person at mysql)

I don't know pylons well, so I won't speak to it...

but my experience with Django & TurboGears was this:

    Django worked very well, but was so engrained to a publishing model  
that i couldn't use it.  That's apparently changed a lot -- its way  
more  flexible now. that new site pownce is running it ( which amazed  
me, it has a very twisted python feature set )
    TurboGears seems like a good idea... But its honestly a mess.  i  
don't want to go into details, but I learned my lesson trying to use  
it and be active on the development.  unless its been rewritten from  
scratch and svn privs from the bulk of committers revoked, i would  
not run it at all.

whatever you choose, i strongly suggest using sqlalchemy or whatever  
its sucessor is.  there were a lot of neat orms in python, but they  
were like the rails ones -- they created and required mindless not- 
scalable database schemas.  sqlalchemy was nice, because you can  
quickly change the schema or map it to an existing db.

if i had to choose a python framework, i'd go for pylons or django --  
they have the more impressive projects built with them out of all the  
frameworks, and they have the most varied.  the other  systems all  
seem to limit what you can do.

on a side note...

    TAL is the best thing ever.  you can jump between frameworks and  
languages , while keeping the same templates.  some of the newer  
python templating toolkits are even better featured, but they lack  
the portability of tal.  i'd strongly look into using it.

// Jonathan Vanasco

% NYC*BUG talk mailing list
%Be sure to check out our Jobs and NYCBUG-announce lists
%We meet the first Wednesday of the month

Got a little couch potato? 
Check out fun summer activities for kids.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nycbug.org/pipermail/talk/attachments/20070704/9bbfb227/attachment.html>

More information about the talk mailing list