What is the best way to deploy a Pylons application?

There are many ways to deploy Pylons applications. - Proxying via apache or nginx for insertion - Deploying the application using mod_wsgi - using some sharp nginx + uwsgi combo - and probably more ...

I read a lot about the different approaches, but could not decide which one to choose.

Proxying for insertion through nginx seems to be the easiest way to configure, but is it effective? Do you embed slower than mod_wsgi or uswgi? If so, is this increase in productivity worth the hassle?

You need a few experts to help me choose the best compromise ... I want simplicity, but I need decent (if not the most advanced) performance, and you Obivan Kenobi are my only hope;)

+7
wsgi deployment pylons
source share
3 answers

If performance is important, take a look at some tests:

http://wiki.pylonshq.com/display/pylonscookbook/Some+performance+test+results

+2
source share

I wanted to say that if the application is more structure-dependent than static content, then the webserver → structure will be the limiting factor, and I found slight differences in the performance of nginx → uwsgi → pylons and apache2 / mpm-worker → mod_wsgi → pylons as the limiting factor are the pylons. This does not mean that the pylons are slow.

No matter which deployment method I used with repoze.who / what, it was difficult for me to scale up to 280 requests per second per processor core.

@mkucharz. As for the results of these results, these results are three years old and do not even come close to the configurations existing today. Pylons 1.0 are about 10% faster than 0.9, the flash is much more mature, and this does not check uwsgi or mod_wsgi. He also uses Mighty, not Mako, also indicating test age.

Other hidden variables include the Python version. On some distributions, I found that Python 2.5 will be slightly faster than Python 2.6, depending on what the application does.

Denial of responsibility:

  • Pylons are not slow. Performance differences
  • mod_wsgi and uwsgi are minor in production settings.
  • Nginx static performance is better than apache.
  • Apache / mpm-worker is much faster than mod-prefork if mod_php is not needed.
  • Almost any deployment you understand is probably enough for 99% of web pages.
  • 99% of published tests do not test the environment properly. Clicking on a page 10,000 times does not indicate real world performance.
  • Trying to be helpful when posting late at night never works. I knew when I saw that this happened on tweetdeck, I would simply not say anything.
+2
source share

The best answer is that it depends.

In terms of pure simplicity, apache2 / mod_wsgi is probably the easiest way to manage since you have a lot more people who understand apache.

In terms of performance, it depends.

If your application works very hard with heavy and not very static content (css, images), the gateway between the web server and the pylons is likely to be your bottleneck, and almost any deployment can handle this.

Paste pretty fast. I found the nginx / uwsgi interface a little faster than apache2 / mod_wsgi. Static nginx performance and memory requirements also support nginx.

There are several sites on which I came across these conversations:

tonylandis.com/python/deployment-howt-pylons-nginx-and-uwsgi/ cd34.com/blog/programming/python/pylons-and-facebook-application-layout/ code.google.com/p/modwsgi/wiki/ IntegrationWithPylons

The comparison I made is with apache2 / mpm-worker, not mpm-prefork, since I don't need mod_php5 in my setup.

+1
source share

All Articles