# Single mongrel -- ok for low traffic?

**URL:** <https://www.ruby-forum.com/t/single-mongrel-ok-for-low-traffic/78037>\
**Category:** Rails\
**Created:** [December 3, 2006, 12:06am UTC](https://www.ruby-forum.com/t/single-mongrel-ok-for-low-traffic/78037 "2006-12-03T00:06:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [December 3, 2006, 12:06am UTC](https://www.ruby-forum.com/t/single-mongrel-ok-for-low-traffic/78037/1 "2006-12-03T00:06:46Z")

</div>

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?

thanks,

Michael

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [December 3, 2006, 3:23am UTC](https://www.ruby-forum.com/t/single-mongrel-ok-for-low-traffic/78037/2 "2006-12-03T03:23:44Z")

</div>

Michael S. wrote:

> 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.

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [December 3, 2006, 3:25am UTC](https://www.ruby-forum.com/t/single-mongrel-ok-for-low-traffic/78037/3 "2006-12-03T03:25:45Z")

</div>

> 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).

Even so… 1000 pages/day / 24 hours/day / 60 minutes/hour = .69  
pages/minute.

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…

I’d say if everything else seems good, go for it.

-philip

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [December 3, 2006, 10:57pm UTC](https://www.ruby-forum.com/t/single-mongrel-ok-for-low-traffic/78037/4 "2006-12-03T22:57:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [December 3, 2006, 11:21pm UTC](https://www.ruby-forum.com/t/single-mongrel-ok-for-low-traffic/78037/5 "2006-12-03T23:21:40Z")

</div>

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 ?

> 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…
> 
> I’d say if everything else seems good, go for it.
> 
> -philip

–  
rm -rf / 2\>/dev/null - [http://null.in](http://null.in)

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

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [December 4, 2006, 3:58am UTC](https://www.ruby-forum.com/t/single-mongrel-ok-for-low-traffic/78037/6 "2006-12-04T03:58:11Z")

</div>

On Dec 3, 2006, at 4:20 PM, Pratik wrote:

> > 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…
> > 
> > I’d say if everything else seems good, go for it.
> > 
> > -philip

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.

cr

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [December 4, 2006, 12:58pm UTC](https://www.ruby-forum.com/t/single-mongrel-ok-for-low-traffic/78037/7 "2006-12-04T12:58:41Z")

</div>

> (By the way Mongrel support is one of the future  
> possibilities DreamHost users can vote for, and I have voted for it.)

Here’s the voting link, if other dreamhost customers would like to vote:  
[https://panel.dreamhost.com/index.cgi?tree=home.sugg&category=Software%20Installations&search=mongrel](https://panel.dreamhost.com/index.cgi?tree=home.sugg&category=Software%20Installations&search=mongrel)

Chris

---

<div class="post-metadata">

**Author:** ![wickie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ba9def/32.png) [@wickie](https://www.ruby-forum.com/u/wickie)\
**Post date:** [December 4, 2006, 3:06am UTC](https://www.ruby-forum.com/t/single-mongrel-ok-for-low-traffic/78037/8 "2006-12-04T03:06:04Z")

</div>

Michael S. wrote:

> 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.

regards

Justin
