Forum: Ruby on Rails Mongrel in Production ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A05834e9b5954947eb0ba3b570c47d5e?d=identicon&s=25 Pratik Naik (pratik)
on 2006-04-16 01:03
(Received via mailing list)
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 !
7f4d868adb4a96f10e7a92532ee9985f?d=identicon&s=25 Jeff Casimir (Guest)
on 2006-04-16 01:31
(Received via mailing list)
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
429500a5a54600958c9c7ac032a37f66?d=identicon&s=25 Joe (Guest)
on 2006-04-16 03:33
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
6076c22b65b36f5d75c30bdcfb2fda85?d=identicon&s=25 Ezra Zygmuntowicz (Guest)
on 2006-04-16 05:17
(Received via mailing list)
On Apr 15, 2006, at 6:33 PM, Joe wrote:

> Rails mailing list
> Rails@lists.rubyonrails.org
> 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
30269682335f1fb247d71969fa715b5e?d=identicon&s=25 Roberto Saccon (rsaccon)
on 2006-04-16 05:44
(Received via mailing list)
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
733436f59b64e31c1dd78fc0d29f3cdb?d=identicon&s=25 Gyoung-Yoon Noh (Guest)
on 2006-04-16 06:27
(Received via mailing list)
On 4/16/06, Ezra Zygmuntowicz <ezmobius@gmail.com> 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.
Ee508a7b3a54d899378eaccc50b25c3f?d=identicon&s=25 Tyler Kovacs (Guest)
on 2006-04-16 10:31
(Received via mailing list)
> 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.
A05834e9b5954947eb0ba3b570c47d5e?d=identicon&s=25 Pratik Naik (pratik)
on 2006-04-17 19:09
(Received via mailing list)
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
8c43ed7f065406bf171c0f3eb32cf615?d=identicon&s=25 Zed Shaw (Guest)
on 2006-04-18 20:31
(Received via mailing list)
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:

* litespeed is used by techno-weenie.com
http://weblog.techno-weenie.net/
* pound in front of N mongrels (gives you SSL too).
http://www.apsis.ch/pound/
* apache or lighttpd in front of a gang of mongrels served by balance.
http://www.inlab.de/balance.html
* just pure balance and a bunch of mongrel servers behind it.

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
30269682335f1fb247d71969fa715b5e?d=identicon&s=25 Roberto Saccon (rsaccon)
on 2006-04-19 21:33
(Received via mailing list)
I just got a recommendation for this poor-man TCP loadbalancer:

http://siag.nu/pen/

I havn't tried it yet myself
This topic is locked and can not be replied to.