Ian Bicking: the old part of his blog


Yep, Apache is a great base for mixed applications. That's what I usually do: Apache in the front, parts built on mod_perl or cgi, parts built on Zope (via mod_proxy and mod_rewrite behind the Apache) and parts with event based rendering that result in static HTML stuff.

Ok, with high traffic systems I usually have a bit more than just one Zope behind the Apache. Actually it's more like two Apache machines with load balancer in front, 4 Zope machines in the back, connected via a Zeo server, a PostgreSQL machine (with a spare one for failover) in the back. Several servers around all that to connect it and hold it together (for example two machines running load balancers to match up between two Apaches and 4 Zopes). But it's a system with 2500 hits per minute in it's prime time, 1000 hits alone to the Zope application parts. Each Zope page with 3-4 SQL statements. :-)

Mixing static and dynamic parts is essential with this system.

Oh, and even a forum can be built with static rendered output: a forum is much more read than written! So just render out index pages when someone writes a comment. Build dynamic parts with Javascript and Dynamic HTML (for example to build outline views of the forum). That way you get a very fast forum for readers - the rendering of new index pages can happen in the background. Or if you use Apache: the cleanup phase of a request is the right place for rendering stuff. In that phase the client is already satisfied, so you don't block anything (beside the process slot - but with high performance systems you already will have patched your system to unusual high values for running processes).

The main problem with really high performance systems that make use of event based rendering is how to build a really fast replicating filesystem. If you create a comment, the comment stuff should go to the background to some rendering machine, be rendered there into static pages that are pushed back to the front machines. That needs to be performant, if you do that wrong, your system will be blocked by shuffling files around :-)
Comment on CMS and static publishing
by Georg Bauer