[Tutor] Python fast enough for ad server?

Eric Walstad eric at ericwalstad.com
Wed May 9 17:41:54 CEST 2007

Hey OkaMthenbo,

OkaMthembo wrote:
> Hi guys,
> I need to write an ad-serving application and i'm using Win XP as my dev
> platform. Naturally, i want it to be as painless as possible and i was
> thinking of writing it 100% in Python. However, i have not written any
> big apps in the language and i wonder if Python would have the
> performance or scale fast enough to a large user base.
Most certainly for some definitions of 'large'  :)

Most web apps these days are not written in a single language/technology
and are often not running on a single piece of hardware.  If you search
the archives of your favorite Python web application framework I'm
pretty sure you'll find a discussion on how to scale your app to handle
a 'large' user base.  At the risk of oversimplification, but in hopes of
avoiding premature optimization, I'd focus first on achieving working
code, then benchmark it, then optimize if optimization is still needed.

Many others have achieved high volume Python web apps using a mix of all
the wonderful open source tools available.  If your content doesn't
change quickly and the ratio of GETs/POSTs is high, a caching server in
front of your python app might be just the trick (memcached, squid,etc).
 But don't waste your time if you don't need to.  Define 'too slow' and
then prove to yourself that your app passes that threshold.  If so, then
figure out why it's slow and optimize the slow parts.

Good luck,


More information about the Tutor mailing list