This document is a step-by-step guide to creating a full-stack server for django and geodjango applications in particular, with an eye towards hosting many django sites simultaneously.
A couple of days ago I tested this setup out with siege on a very simple production site of mine and it stood up to the equivalent of 1 million unique page requests / day. Running top simultaneously showed CPU hovering between 1%-3% during the siege while memory usage for the full stack did not exceed 250m. This was due, of course, almost exclusively to memcached. I’m sure someone who actually knows what they’re doing could make this thing stand up to a lot more than that with some tweaking.
The stack is based on Ubuntu 8.04 Hardy Heron.
As an incoming web request would see it, the stack is made up of an
This file has been largely ripped off directly from the awesome setup articles by PickledOnion on slicehost, Will Larson’s post that got me started on django: Dreamier Dream Server, and the Geodjango documentation. In each section I’ll be linking to the original setup docs, but I’m collecting them all together here for the convenience of those folks who want to blaze through the process on a pristine Ubuntu 8.04 Hardy Heron slice.
NOTE: As of writing, some new evil has happened with the compiling process on the geography extensions which renders them unusable. If anyone has ideas on how to solve this problem, you’d be making this setup guide truly the best, evar, mb.