3 ms·
Interesting, I was just trying to figure out how to install this last night on a Ubuntu Lucid VM. Eventually though I just gave in and installed/used pip. Was
by mixmastamyk 16y ago
Interesting, I was just trying to figure out how to install this last night on a Ubuntu Lucid VM. Eventually though I just gave in and installed/used pip. Was ultimately successful, although it seems to be using an old libevent 1.4 even though there is a 2.0 out that it is supposed to be faster.
I originally was attracted to gevent after reading about its excellent performance and resource usage. I'd like to use it in concert with nginx to host a django app. I wonder if this is the best choice though? I got it to work, but it seemed a little unnecessarily complex... having to install large dependencies/compile things on the server. Maybe I should just use the wsgi module built into nginx?
These packages are so new I'm not confident on the best course of action.
- pjscott 16y agoFor django app hosting, I believe the usual good advice is to use something like uWSGI or Gunicorn to manage a load-balanced worker pool, and use nginx in front as a reverse proxy. There are a lot of subtle things that such a configuration does correctly out of the box. It looks like Gunicorn is really easy to set up, uWSGI has more features, and both are good, solid choices that lots of people are using in production: http://gunicorn.org/ http://gunicorn.org/ http://projects.unbit.it/uwsgi/ http://projects.unbit.it/uwsgi/ If some parts of your application need to handle loads of concurrent connections (e.g. long polling, streaming, etc.) then you can use something like Tornado or eventlet or gevent to make that part of your app, and stick it behind nginx as well. You can also use the asynchronous worker types supported by Gunicorn and uWSGI. Which one is more straightforward is up to you. As usual, you'll want to use something like Supervisord, Upstart, or Monit to monitor your daemons and restart them if they malfunction.
- mixmastamyk 16y agoThanks for the info. uwsgi was my second choice, gunicorn didn't seem to have as good performance, but if it is a lot easier I'll give it a try. To be honest, performance isn't a huge concern for my app, but I'm trying to fit it into a ec2 micro and therefore want to squeeze the most from it.