Wednesday, March 7th, 2012

Completed server migration

I just completed my server migration, a server full of Django apps, to a new server over the past few hours.

I needed to migrate to a new server due to a network latency issue on my Rackspace Cloud server. It was degrading the upstream network performance. Meaning some of my sites tended to time-out during longer requests, and updating the Linux packages was a pain, as it took forever.

It didn't all end bad though, in the process of the migration, I upgraded the version of nginx I am using, and instead of using FastCGI, I went for uWSGI using Fastrouter and a few other goodies uWSGI has to offer. I would completely recommend reading Jeremy Bowers | Django, Nginx and uWSGI in production, as it explains how to get up and running with uWSGI rather quickly on most Linux platforms. I used part of this tutorial, and a custom options from uWSGI to tailor it to my needs.

What is your preferred way of hosting Python web applications?

Comment #1: Posted 3 years ago by Samat

Never really understood the benefits of µWSGI… other than it can operate in a language-agnostic manner, why would you use it over plain old WSGI?

Comment #2: Posted 3 years ago by George Kappel

Just did nginx and uwsgi setup for an upcoming beta test

For nginx if you use SSL, the following makes a big diff
ssl_ciphers HIGH:!kEDH!aNULL:!MD5; #excluding DH Ephemeral for performance reasons

To make sure things are aok the following free load testing tool is pretty helpful

Comment #3: Posted 3 years ago by roberto

@Samat the name 'uWSGI' is the most unfortunate choice ever. for tons of reasons. uWSGI is an application server, uwsgi is a communication protocol (the one supported by nginx) and WSGI is one of the standard it supports. So, uWSGI is not a substitute for WSGI, is an implementation of it.

Comment #4: Posted 3 years ago by Kevin Veroneau

Hello Samat. Thank you for the comment. uWSGI has some very powerful features which are not available in standard server configurations. I would recommend looking at their Examples page, especially the example labeled "Massive Django hosting with automagic config and lower resource impact", it explains how a hosting provider can easily provide Django hosting with minimal server configuration. FastRouter is definitely a selling point of uWSGI.

Comment #5: Posted 3 years ago by hlynr

I strongly suggest reading this:

About Me

My Photo
Names Kevin, hugely into UNIX technologies, not just Linux. I've dabbled with the demons, played with the Sun, and now with the Penguins.

Kevin Veroneau Consulting Services
Do you require the services of a Django contractor? Do you need both a website and hosting services? Perhaps I can help.

This Month

If you like what you read, please consider donating to help with hosting costs, and to fund future books to review.

Python Powered | © 2012-2014 Kevin Veroneau