So you've written a Django site... now what? Writing the site is just the beginning; now you've got to put it into production! Bring your Django site to this hands-on workshop and learn how to build a robust production environment around it.
Not in Boston? This workshop is also being offered in LA.
In this hands-on workshop we'll walk through the creation of a simple Django deployment environment. We'll cover a couple of options for application servers (mod_wsgi and gunicorn), some automation technologies (Fabric), load balancing tools (nginx), and various caching and scalability techniques. By the end of the class, each student will have created a simple production environment featuring load-balanced, redundant web servers. Though fairly simple, this production environment could easily serve most small-to-medium apps.
Students are encouraged to bring their own Django sites to deploy; we'll try to examine the differences between students' applications as part of the instruction. For students who need it, an example Django application will also be provided.
Although the class will focus on Django, the tools and techniques covered apply to any WSGI-compliant Python web framework — thats all of the popular ones and most of the others, too — so developers using other Python frameworks are welcome!
So that we can be as hands-on as possible, this class will be limited to 15 students, so please register early.
Introducing our example application.
Overview of where we're going.
Initial server setup.
What's an application server?
Overview of Python WSGI servers
Introducing virtualenv and pip
Exercise: set up virtualenv
Configuring Apache and mod_wsgi
Exercise: deploy the application under mod_wsgi.
Exercise: initial load test.
Hints for running gunicorn in production
Exercise: deploy the application under gunicorn
Exercise: compare load tests
Database server: PostgreSQL
Why a separate database server?
Exercise: split out the database server.
Integrating fabfiles into Django applications
Exercise: deploy using Fabric
Load balancing and multiple web servers
Why multiple web servers?
"Shared nothing" and multiple servers
What's a load balancer?
Exercise: deploy nginx.
Types of caching.
Exercise: deploy memcached.
Final load test: how'd we do?
About the instructor
Our instructor is Jacob Kaplan-Moss, one of the creators and lead developers of Django. He's been teaching Django and Python courses since 2006, and is the co-author of The Definitive Guide to Django (Apress, 2007).