So you’ve written a Django site… now what? Writing the application is just
the beginning; now you’ve got to put it into production! In this hands-on
workshop we’ll walk through the creation of a full Django deployment
environment running on a cluster of (virtual) machines.

This class will introduce students to a wide variety of technologies, including,
Apache, Fabric, nginx, mod_wsgi, memcached, PostgreSQL, pgpool, pg_standby, and
more.

By the end of the class, each student will have created an environment
featuring:

Multiple levels of caching and load balancing.

Multiple web application servers.

Redundant replicated database servers.

We’ll create this whole stack on virtual machines, and students will be able to
take home a complete copy of all the deployment configuration for future review
at their leisure.

Note: the example application used in this class with be a Django site, and
the class assumes at least a moderate comfort level with Django. However, the
tools and techniques apply just as well to other Python web frameworks, so
users of other tools will likely be able to follow along fairly easily.

Outline:

Getting started

Introducing our example application.

Overview of where we’re going.

Very brief intro to EC2 and S3.

Exercise: run our first VM.

Application server: mod_wsgi

What’s an application server?

Introducing mod_wsgi

Configuring Apache and mod_wsgi

Exercise: deploy the application under mod_wsgi.

Exercise: initial load test.

Database server: PostgreSQL

Why a separate database server?

Configuring PostgreSQL

Exercise: deploy PostgreSQL.

Introducing Fabric

What’s Fabric?

Writing fabfiles.

Integrating fabfiles into Django applications.

Exercise: deploy using Fabric

Multiple web servers

Why multiple web servers?

“Shared nothing”

Dealing with medi

Load balancers

Introducing nginx

Using nginx as a reverse proxy

Exercise: deploy onto multiple machines.

Exercise: crash a web server.

Caching servers

Local caching vs. dedicated caching.

Introducing memcached

Using memcached with Django.

Exercise: deploy with multiple cache servers.

Database connection middleware

Why connection middleware?

Introducing pgpool.

Configuring pg_pool and Django.

Exercise: deploy pg_pool

Database redundancy

Redundancy strategies

Warm standby with pg_standby

Exercise: configure warm standby

Exercise: fall over to the slave

Final exercise: load testing – how’d we do?

People planning to attend this session also want to see:

Jacob Kaplan-Moss

Revolution Systems, LLC

Jacob Kaplan-Moss is one of the lead developers and co-creator of Django. Jacob’s an experienced software developer with a focus on web application architecture. He’s a consultant with Revolution Systems, where he helps companies deploy and scale websites using Python and Django. Jacob previously worked for the Lawrence Journal-World, a locally-owned newspaper in Lawrence, Kansas, where he helped develop and eventually open source Django.