Deploying Django apps

One part of the application life cycle is deploying it. Since I knew virtualenv I think one of its major advantage is to keep isolated every project running in the same server. However Alberto Morales make me note this aproach has its major disadvantage too.

Isolating each project makes them fully independent. You can install different versions of Django, and any other lib you need using easy_install or pip making it really simple. You can even has several virtualenvs for the same project (this could be interesting to try new versions of libs). You can upgrade your libs in a simple manner.

Among disadvantages maybe the more clear is that, if you use almost the same libs in your projects you will be having several copies of the same things, and even worse, as they are in differents path you will have several copies of the same things in memory.

IMHO the servers are quite cheaps to try to optimize things to that level. Having a dedicated server in ISPs such as OVH or 1AND1 is cheap. Let’s said your choiced plan is about 750 euros/year, this means about 62.5 euros/month. Having this in mind (and assuming the projects I meaning are those that can be run several in a server) you should note that if deploying your projects for performance makes you work (let says) 4 hours more in a month than deploying them in a easy way, you would optimize your time contracting another server.

That’s way I’d rather to use an easy way to deploy projects even if the mem footprint is higher.

Advertisements

3 Responses to Deploying Django apps

  1. […] This post was mentioned on Twitter by Django Ireland, esauro. esauro said: I wrote a new post about deploying django apps to my english blog https://esauro.wordpress.com/2010/06/02/deploying-django-apps/ […]

  2. Several reasons:

    – Buying more and more servers is not “green computing”. We dont use Java because we are green 🙂

    – If you use a second server, you are losing 750 eur/year. Imagine the application is going to be online during two years. Spending 2 hours (for example 100 eur) in optimizing the server the first time, lets you have 1500 – 100 = 1400 eur profit.

    A summary: you configure once and you serve during many months. And meanwhile you are not changing libraries. Only security upgrades. Virtualenv is like a chainsaw when you only need a cutter.

  3. OK is not so green, but the overhead is not so much. A typical project footprint is about 75M using its own libs, so in a 4 GB servers you can hold tons of projects. How much of those 50M are the overhead for using its own libs?.

    On the other hand, we deploy new versions of projects every week. Sometimes new features needs new libs versions. If investing 2 hours we get a 20% better performance in all the project live I would agree with you, but that’s not the case.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: