Joe Ray

Principal Engineer

A scalable architecture for Django applications using Docker

This is a draft post. Please do not share widely until this message has disappeared.

Having been playing about recently with Docker and CoreOS I’ve been considering how to use them in a deployment scenario using a Django app as an example.

A traditional Django deployment will probably involve something like the following:

  • A deployment of Django fronted by Gunicorn and a web server which serves the dynamic Django-driven content as well as static assets
  • A relational database as a persistent store for the application’s data
  • Some sort of caching technology (Memcached, Redis etc.)
  • Maybe a queue and worker combo like Celery

We’ll split each of these components into their own Docker container and allow them to scale using Fleet (part of CoreOS) to deploy them on multiple hosts. The architecture will end up looking something like this:


  • Introduce components - with diagram
    • Django app
    • Static resources
    • Load balancer (HAProxy or the etcd-driven one)
    • Database/Memcached etc.
  • Use etcd for dynamic configuration

Contact Me

I love a good conversation! E-mail me (encrypted if you want) or find me on Twitter, LinkedIn and GitHub.