I'm runnig Pytho开发者_开发问答n Django on Apache2 with ModWSGI and I would like to run Ruby on Rails on the same server.
Is it possible do this?
I read that Passenger for Ruby on Rails can support Django too.
Any help is welcome. Thanks.
Yes, I've done it. I would not suggest doing it for a server that is busy or prone to load spikes because of the way these modules work, they embed code into the server process itself (though mod_wsgi is better than mod_python for this).
When I do HEAD http://my.dev.server the response headers include this: Server: Apache/2.2.8 (Ubuntu) DAV/2 Phusion_Passenger/2.2.15 PHP/5.2.4-2ubuntu5.10 with Suhosin-Patch mod_wsgi/1.3 Python/2.5.2
For example, if you have 40 apache child processes adding mod_wsgi may add a couple megs of RAM to each, so used RAM may go up by 100MB. Adding phusion passenger made cause each child to use another 5 MB of RAM increasing it by 200MB more.
However, if you have 10 apache child processes this is not a huge deal.
If you are on a server that gets these busy periods then one way to achieve better results is to use nginx instead of Apache (or fastcgi with apache). It does not embed any of the application code into the http process.
精彩评论