Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Or should I be using a totally different server?

like image 623
Josh Gibson Avatar asked Feb 28 '23 19:02

Josh Gibson


1 Answers

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.

like image 86
Ben Bangert Avatar answered Apr 06 '23 22:04

Ben Bangert