Best setup for shared hosting?

is fcgi/apache still the best thing for shared hosting environments, or
is there something better?

mongrel sounds awesome, but i’m wondering how it does with multiple
apps on multiple domains since it sounds like you have to run a mongrel
server for each application.

Here’s an easy way to look at it: One Mongrel server equals one instance
of
fastcgi.

Say your shared host allocates 2 fastcgi servers (dispatchers) for your
application. That’d be like having two mongrel instances running.
Roughly
the same memory footprint.

Mongrel instances can be clustered using the awesome mongrel_cluster
gem…
you choose how many instances you need along with the starting port and
it
will start / stop the various processes. At that point it’s just a
matter of
forwading requests from Apache to Mongrel.

I don’t know how many shared hosts go the mongrel route. A few do
though.

On 27 Sep 2006, at 21:45, Brian H. wrote:

processes. At that point it’s just a matter of forwading requests
from Apache to Mongrel.

I don’t know how many shared hosts go the mongrel route. A few do
though.

a2hosting does for example. You need to make sure your app runs in
CGI mode first, then post a ticket on the support site and they’ll
proxy your app to a mongrel. If you do have a bit of cash, I would
still advise using a VPS instead of a shared host. E.g. send_file in
its default setting (streaming the data) will crash your mongrel
instance. Why? No idea, it just does. Also, any plugin or class that
extends one of the Rails classes, will make your mongrel crash, you
need to freeze rails in your vendor folder. I wouldn’t use a2hosting
anymore (although they provided me with good support), just because
Rails isn’t their main target audience. For shared hosting, I would
certainly tend to look at railsplayground now (they use fcgi i believe).

Best regards

Peter De Berdt

On Sep 27, 2006, at 12:45 PM, Brian H. wrote:

I don’t know how many shared hosts go the mongrel route. A few do
though.

Mongrel is what we recommend[1] when you’re a hosting customer at
PLANET ARGON.

We automatically proxy your unique ports through our main proxy
servers[2], so you’re able to manage your own front-end to mongrel
with Pound[3], Nginix, or Lighttpd.

…and we encourage you to do it all with Capistrano!

For more information on our hosting services, visit http://

[1] http://www.dgibbons.net/articles/2006/8/8/why-you-need-multiple-
mongrel-instances-with-rails
[2] http://docs.planetargon.com/wiki/show/ProxyOverview
[3] http://docs.planetargon.com/wiki/show/Pound+and+Mongrel

Cheers,

Robby


Robby R.
Founder and Executive Director

PLANET ARGON, LLC
Ruby on Rails Development, Consulting & Hosting

www.robbyonrails.com

+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]

I used Litespeed + Ruby LSAPI as an experiment at
http://freeonrails.com and it’s been far more better than Apache/fcgi.
It’s surely worth a shot.

Thanks,
Pratik

On 9/28/06, Brian H. [email protected] wrote:

…and we encourage you to do it all with Capistrano!


rm -rf / 2>/dev/null - http://null.in

Dont judge those who try and fail, judge those who fail to try…

Robby:

I didn’t want to speak for you but I hoped you’d chime in. :slight_smile: