[Mongrel] Mass virtual hosting with mongrel
john at fivesquaresoftware.com
Thu Sep 7 15:46:08 EDT 2006
Thanks for the quick replies. Some more info:
As you mention, Kirk, we are looking to host different instances of
the same app, correct.
Basically, let's say we are hosting an online community app, with one
instance each for a particular region in a geographical area. So,
we'd like a different instance, as opposed to a single instance that
switches the underlying context—DB connection, config info, etc.—so
that we can keep the data partitioned nicely, not adversely affect
performance (these could get a lot of traffic and we'd like to have
each one partitioned from the others in case one has issues), have a
unique docroot for file storage, etc.. Also, these apps have to be
dynamically provisioned—that is, not require a Web server restart or
any human intervention to create a new instance.
To wit, our plan is to deploy app stubs that link in the shared
codebase (haven't figured that one out), and use Apache's docroot
interpolation to look up an instantiate the correct instance. We use
mongrel for other apps now and really like it—it's made our apps a
lot snappier and the reverse proxying stuff just works.
The problem (as I see it, and maybe I'm wrong) amounts to being able
to not have to create and configure a new mongrel (or cluster) every
time we dynamically provision an app. This would involve modifying
our Apache conf, restarting, keeping track of used ports, etc., and
this we sincerely want to avoid.
So, this is when I started to think that it might be possible to add
to mongrel functionality similar to what apache does or say what you
might do with a J2EE container—host multiple apps in one container
and add some sort of dispatching to route requests to the right place.
Thanks for your insight.
I'm not sure I totally understand what you're doing with your
connectors, but I'd like to hear more ...
On Sep 7, 2006, at 11:50 AM, Jason A. Hoffman wrote:
> What are you mass virtual hosting exactly?
> And what I mean by this is that with one of our apps (the connector),
> I can have either connector.jasonhoffman.org or jason.joyent.net pull
> up my webmail, contacts, calendaring, files etc and that's distinct
> from anyoneelse.joyent.net and they can have as many other domains
> map to it as they want.
> We do this all via stateless (in this context) mongrel processes,
> anyone can hit any of them and get their stuff.
> Or are you talking about the mass virtual hosting of many different
> Rails or Ruby applications?
> - J
On Sep 7, 2006, at 11:51 AM, Kirk Haines wrote:
> On 9/7/06, John Clayton <john at fivesquaresoftware.com> wrote:
>> How can one host multiple domains with mongrel? Assuming you are mass
>> vhosting and you also want the performance benefits of using
>> mongrel ...
> If I remember right, you are looking at a situtation where you have a
> single application that will have a different look and feel applied,
> depending on the domain it is being served to, right?
> So couldn't you just set up your app to look at the SERVER_NAME and
> choose the theme for the content appropriately?
> Then you just setup your Apache vhosts and feel all the traffic into
> the same mongrel cluster, and you don't have to do anything at all at
> the Mongrel level, right? You leave it to your app to be multidomain
> What am I missing?
> Kirk Haines
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
More information about the Mongrel-users