Topic: Deply with Mongrel or fastcgi?

Does anyone have any thoughts on the best way to setup a production server for a Rails app?

My current thinking is to use Mongrel with Apache 2.2 mod_proxy_balancer. If using this method how many mongrel instances should you start? 2? If using this method, can you install more than one app on a server?

AFAIK, using fastcgi allows multiple applications on a server and this is what I'm using to develop the app and it seems fast enough - but I'm the only one using it and its important the apps run fast (obviously).

Any thoughts welcome smile

Adam

Re: Deply with Mongrel or fastcgi?

shadow wrote:

My current thinking is to use Mongrel with Apache 2.2 mod_proxy_balancer.

This is a good way to go. Apache has a bigger memory footprint than others if that is a concern, but it should be okay.

shadow wrote:

If using this method how many mongrel instances should you start? 2?

Depends primarily on how much memory is available. If you're on a VPS with limited memory or are sharing the computer with several other apps, I'd say 2 is a good start. Otherwise bump it up to 4 or something.

shadow wrote:

If using this method, can you install more than one app on a server?

Yep. I'm not sure on the details, but it shouldn't be a problem.

BTW, look into the deprec gem. It's a quick way of installing a full Rails Stack on a server along with Apache, mongrel clusters, the works.

Railscasts - Free Ruby on Rails Screencasts

Re: Deply with Mongrel or fastcgi?

Thanks Ryan - my thinkings exactly.

Not so sure about deprec - personally, I prefer to keep as much control as possible, installing apache and mongrel isn't a problem for me. I'll setup a virtual server and have a play tomorrow.

Re: Deply with Mongrel or fastcgi?

Good man. Deprec was just a test to see if you'd fall for it. wink

Seriously though, if you're still in the playing phase, you might want to try it out to see how it sets up the configuration, etc. I know setting up Apache with a mongrel cluster can be tricky sometimes. Afterwards you can wipe it clean and do everything manually so you have more control and understanding.

Railscasts - Free Ruby on Rails Screencasts

Re: Deply with Mongrel or fastcgi?

Thats not a bad idea, is there a prefered linux flavour for this sort of thing?

Re: Deply with Mongrel or fastcgi?

I'm using deprec with Ubuntu, there is a free screencast on peepcode.com showing how you can do it

Re: Deply with Mongrel or fastcgi?

Hmm, I'm not familiar enough with them to know, perhaps someone else does? (*cough* Danger *cough*)

I've been playing around with Ubuntu on my slice and it has been great. That's the only one I've had experience with.

Railscasts - Free Ruby on Rails Screencasts

Re: Deply with Mongrel or fastcgi?

I saw the peepcode screencast showing setting up ubuntu with deprec and it looked pretty simple although I'm not sure about ubuntu in a real server environment.

All our other servers run Gentoo (as does my development server) but this have historically only run PHP apps in the past although I'm sure they will be fine with rails and mongral.

Re: Deply with Mongrel or fastcgi?

You should also compare your Apache setup with Litespeed, it is fast, free and easy to setup.

Kind regards,

Nick
------
http://www.railshostinginfo.com - Runs on Litespeed
Compare Rails hosting companies