If I want to use a pylons app with Apache, should I use mod_wsgi or proxy to paste?

0

Issue

Or should I be using a totally different server?

Solution

Nginx with mod_wsgi requires the use of a non-blocking asynchronous framework and setup and isn’t likely to work out of box with Pylons.

I usually go with the proxy route to a stand-alone Pylons process using the PasteScript#cherrypy WSGI server (as its higher performing than the Paste#http one, though it won’t recycle threads if you have leaks…).

If you’re set on using Apache and its your server (so you can compile and run Apache mod_wsgi), I’d suggest using that setup as its less maintenance to effectively utilize multiple cores. With a proxy setup, you’d have to use the mod_proxy_balancer with multiple paste processes to effectively utilize multiple cores/cpus.

If you’re deploying to someone else’s Apache (shared hosting), mod_proxy is generally the easier solution as its stock in Apache 2.2 and above.

Personally, I usually deploy with nginx + proxy to multiple paster processes.

Answered By – Ben Bangert

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More