[Mongrel] Several applications on one box
spmikedev at yahoo.com
Tue Apr 18 15:12:11 EDT 2006
Thanks for your answers.
Actually, in my example, I meant having e.g. 10 virtual domains (=10 applications) that are
handled by a pool of say 4 mongrels.
But from your first answer I understand that this is not a wise choice. I need a minimum of 1
mongrel per application.
--- Zed Shaw <zedshaw at zedshaw.com> wrote:
> Hi Mike,
> Answers below...
> On 4/9/06 7:27 AM, "Mike M" <spmikedev at yahoo.com> wrote:
> > Question: Is it possible to run several applications using a single mongrel
> > instance?
> Probably not the very best idea really. I believe there's some hacks out
> there that will make Rails do this, but I've found that mixing Rails with
> anything--even other rails apps--in the same Ruby process is pure death.
> My thinking is that if you really wanted to support it then you'd have to
> somehow have a small Mongrel handler that caught the Host: header and routed
> to different URLs based on that. If you're going to do this then I'd
> recommend using mod_rewrite in Apache or Lighttpd.
> > Background:
> > I want to set up several low-traffic sites on one server. I now have this
> > configuration:
> > Apache virtual-host for domain1
> > -> proxy to mongrel instance 1 on port 3000
> > Apache virtual-host for domain2
> > -> proxy to mongrel instance 2 on port 3001
> > etc etc.
> > Ideally, I'd like a pool of say 4 mongrel instances to serve all the
> > applications.
> Now, this will work. I know of several people who do this with Apache and
> Lighttpd. Main thing is to put the Proxy configurations inside the Vhost
> configs so that when people request domain1 they are proxied back to port
> 3000, and so on. If your sites are really low traffic then one Mongrel for
> each site should be good enough.
> If you want to have many Mongrel servers as backends easily via Apache I
> recommend you use http://www.inlab.de/balance.html and have it listen on
> port 3000 and then proxy to as many as you want. In your case you'd run two
> balance servers: one for port 3001 and another for port 3000.
> Hope that helps.
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
More information about the Mongrel-users