Mongrel in Production?

Hi Everyone,

I was setting up Lighty+Fcgi on our server for last couple ( read
zillion ) of hours. I had posted my problems in my previous email. But
all in vain…

So, for time being, I switched to Mongrel. And the performance seemed
quite good. This is the first time ever I’m using mongrel ( Awesome
stuff ZedShaw…Thanks! ). I’m wondering if there are many people
around who’re using Mongrel in production environment. What are the
benefits compared to Lighttpd ? Any performance/scaling issues ? Any
catch ?

Sole reason behind this email is simplicity offered by mongrel. Not
easy to accept that something so easy to setup can work so
fantastically !

Thanks,
Pratik

http://www.freeonrails.com - Free as in beer !

I’ve been using Mongrel to run the website for my upcoming Workshop For
Good (http://www.workshopforgood.org) - (plug, plug).

It has run GREAT. While you can use it “raw” - by itself - I think most
people put it behind lighttpd. You can then let light do the things it
does well (caching, serving html, load balancing) and let mongrel do
what it does well (run Ruby code). I think you should be able to scale
very well by doing the “same old things” of having a few running
interpreters first, spread db and rails code to separate boxes second,
then go to clustered boxes for rails & db third. I believe there was
talk last week that the clustering support is “next on the to-do list”
for improvement. Zed has received some funding to allow him to work on
Mongrel with intensity, so look for rapid progress.

The mongrel userbase is pretty small and friendly, not to mention Zed
himself who is the latter, though I know not about the former. Join the
mailing list and post questions, results, etc.

-Jeff

I use Mongrel in production and ever since 0.3.12 or something (the
latest) it has held up great. I also use it proxied behind Lighty. And I
also don’t know if Zed is a big or small guy.

Joe

On Apr 15, 2006, at 6:33 PM, Joe wrote:

Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

I’m using mongrel proxied behind lighty for windows production. Have
an app that has to run on windows because it uses Watir to drive aome
websites with IE. But its working great so far. 10 mongrels behind a
lighttpd proxy.

Mongrel is almost as fast as fcgi and much easier to set up. The

only thing thats a bit of a pain to do is have lighty serve the
static content and mongrel only serve the dynamic stuff.

Cheers-
-Ezra

How much of a pain ?

As described in Zed’s docu ? Or did you find something which provides
less
pain ?

Because I am planning right now to put a debian lighty in front of
mongrel

I’m using mongrel proxied behind lighty for windows production. Have

On 4/16/06, Ezra Z. [email protected] wrote:

    Mongrel is almost as fast as fcgi and much easier to set up. The

only thing thats a bit of a pain to do is have lighty serve the
static content and mongrel only serve the dynamic stuff.

Indeed. Anyone win out in this arena?

I even got all static stuff served in independent lighty
server(static.host.com),
but I failed to setup lighty to send 304(Not modified). Only 200
responses.
What a crazy waste!

I really look forward to see the documentation how to cooperate lighty
proxy
with backend mongrel servers.

Thanks for your input guys.

I have one more question. Right now, I am using Apache 2.0.x to proxy
request to Lighttpd . Is it advisable to add one more level of proxy
to setup Mongrel behind Lighty ? Or should I just get rid of Apache
and use Light -> Mongrel combo ? How much affect does proxying has on
performance ?

Thanks & Regards,
Pratik

I really look forward to see the documentation how to cooperate lighty proxy
with backend mongrel servers.

There are some instructions here:

http://mongrel.rubyforge.org/docs/lighttpd.html

Plus, you get bonus docs on configuring a LUA CML powermagnet in
lighttpd for
flexible handling of static content requests.

I just got a recommendation for this poor-man TCP loadbalancer:

http://siag.nu/pen/

I havn’t tried it yet myself

Patrik,

I’ve actually found quite a few bugs in lighttpd’s mod_proxy code. You
could try using just lighttpd for the raw speed, but if backends go down
it
seems to not compensate properly and will give a 500 error instead of
try
the next backend in the list.

I recommend you try one of the following configurations as alternatives:

I’m using the last configuration without any problems so far. Balance
is
able to listen on one port and load balance the TCP traffic to as many
mongrel instances as you like. It’s really easy to setup but I’m pretty
sure it don’t work that well on windows (I could be wrong). The idea is
then you can just point apache or lighttpd at one port and let balance
do
the proper management. Also lets you add more mongrels with a quick
restart
of balance.

Balance doesn’t give you SSL though so the next option is to use Pound.
Pound is a little on the slow side since it uses native threads but it’s
easy to setup and works well.

The litespeed setup is pretty interesting and I’ll be checking it out
very
soon. Rick swears by it so I’m sure it’s good.

Zed