Dream Geodjango Server - Overview

Intro

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.

Stack overview

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

  • Nginx frontend that serves up static media files and passes the heavier dynamic requests back to an
  • Apache 2.2 MPM server running mod_wsgi serving dynamically generated files that have been cached in a blazing fast
  • cmemcache, but originally generated by
  • Django 1.0, using a
  • Postgres 8.3 database, with custom compiled geography extensions
  • geos, proj.4, postgis, and gdal installed, along with special guest stars
  • Subversion, Postfix, and Rsync installed, because you might need them

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.

 
/var/www/dokuwiki/data/pages/dream_geodjango_server.txt · Last modified: 2008/10/08 17:40 by prairiedogg
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
© Slicehost 2006-2007