Here's what's annoying about Mongrel, summed up:<p>> As the title of this article suggests, only 7 mongrels were required to sustain the level of traffic. (this number was already set to seven before the digging, and didn't have to be increased)<p>Having to pick arbitrary numbers beforehand is a bad way of scaling. Apache with fcgid launches new processes as they're needed. It may not scale due to other problems, but "pick a number and pray" strikes me as a dubious idea.
<i>I don't remember where I got the following snippet from so if someone knows, please point it out so that I can give them credit.</i><p>How many mongrels?<p>Here's a simple formula to follow:<p>A. Take the (average or median) request time, in seconds. Say, 0.250 seconds (250ms)<p>B. How many requests do you want to handle at peak? (e.g. 10,000 a minute, 166 a second)<p>C. Multiply A x B : 0.250 * 166 = 41.5<p>So you need about 40 mongrels to handle the load. At about 60MB per listener, that's 2.4GB of RAM, plus a bit of room for leakiness and swapping. Ezra at Engine Yard suggests "about 10 dogs per CPU core", which means that if we have a 4-core opteron box with 3GB of RAM, then this is possible on one box.<p>Your mileage will vary, which means, if the box is lagging, remove a few mongrels.
i'm not much of a rails head but I did enjoy that article and it makes me happy that we're using nginx on <a href="http://Skribit.com" rel="nofollow">http://Skribit.com</a>