Media Temple is offering what seems like an interesting offering with
their Grid Server, claimed to be much superior to typical shared
servers, for $20/month. You can get a "Rails Container" with 64M as
part of this price, or with 256M for another $25/month. So its
$45/month for a 256M rails setup. You can have up to 100 domains and
multiple rails apps.
However... they allow only one Mongrel instance per container.
Everything I see about deploying on Mongrel talks about using multiple
instances with mongrel_cluster. MT says they may offer that in the
future.
My question: just how bad is it to run a rails app with a single
Mongrel instance? If it gets, say, 1000 hits per day, is that really
much of an issue?
Media Temple is offering what seems like an interesting offering with
their Grid Server, claimed to be much superior to typical shared
servers, for $20/month. You can get a "Rails Container" with 64M as
part of this price, or with 256M for another $25/month. So its
$45/month for a 256M rails setup. You can have up to 100 domains and
multiple rails apps.
However... they allow only one Mongrel instance per container.
Everything I see about deploying on Mongrel talks about using multiple
instances with mongrel_cluster. MT says they may offer that in the
future.
My question: just how bad is it to run a rails app with a single
Mongrel instance? If it gets, say, 1000 hits per day, is that really
much of an issue?
Others will be able to give you the benefit of much more experience, but this seems very strange to me. Rails is expensive on memory precisely because you need a whole Ruby/Rails process per concurrent request. If you are limited to one Mongrel, it doesn't make sense to have large amounts of RAM, many domains, or multiple apps.
For a low-volume app why not start with DreamHost, using one of their first-year discount codes? You could get your first year for about the price of one month at MediaTemple, and you would get more than one FastCGI process. (By the way Mongrel support is one of the future possibilities DreamHost users can vote for, and I have voted for it.)
regards
Justin
P.S. Sorry for the delay in replying - your message circulated in the ether (with a bunch of others) for nearly two weeks before reaching me.
Media Temple is offering what seems like an interesting offering with
their Grid Server, claimed to be much superior to typical shared
servers, for $20/month. You can get a "Rails Container" with 64M as
part of this price, or with 256M for another $25/month. So its
$45/month for a 256M rails setup. You can have up to 100 domains and
multiple rails apps.
However... they allow only one Mongrel instance per container.
Everything I see about deploying on Mongrel talks about using multiple
instances with mongrel_cluster. MT says they may offer that in the
future.
My question: just how bad is it to run a rails app with a single
Mongrel instance? If it gets, say, 1000 hits per day, is that really
much of an issue?
Let's assume that it's 1000 *pages* per day since if it's hits, most of that is going to be images/css/javascript and served up by apache (if they've configured it right).
A single mongrel can *easily* do that and should be able to handle anywhere from 20-60 requests per second depending on what your'e asking it to do.
And this assumes that you aren't cashing *anything*. For a low traffic site (personal, blog, etc.) it would be fine. It would be nice to know that if you got really popular you could easily expand to multiple mongrels though...
Thanks for the comments. I got nervous about the Media Temple grid
server after reading about lots of downtime people were experiencing,
and I concluded it wasn't quite mature enough. I decided to spring for
a BantamVPS at Rails Machine, which is about twice the cost but should
be very robust.
Just wondering, what's the scenario with file uploads and mongrel. If
the site allows users to upload files, won't the mongrel process be
busy while the file is getting uploaded ?
Thanks for the comments. I got nervous about the Media Temple grid
server after reading about lots of downtime people were experiencing,
and I concluded it wasn't quite mature enough. I decided to spring for
a BantamVPS at Rails Machine, which is about twice the cost but should
be very robust.
Looking around after I had replied to you, I got the impression that Media Temple had built up a good reputation before they went for this "grid" thing, but that the grid has a lot of problems. I looked at the technical guidance on their site and was unimpressed. I'm sure you'll be happier with Rails Machine.
No, Mongrel won't be busy during the upload. It handles the upload in a separate thread and can manage many other connections during the upload. However, once the upload completes, Mongrel will pass the file on to Rails which will require it get re-parsed by cgi.rb which could take quite a long time (several seconds per 10MB).
In summary, Mongrel is nicely threaded and will handle many things simultaneously. When it comes to communicating with Rails, everything has to go through a Mutex which locks Mongrel out from doing other work.