Mongrel Now Recommended Setup?


#1

I see that the RubyOnRails.com site has migrated to Mongrel with Apache
as a
front-end proxy.

Is that now the/a recommended setup for Rails apps? We’re still using
FCGI
but I’m always interested to learn more about other folk’s successful
deployment choices.

Across all of our sites we’re pumping out about 300k pages per day so
anything that saves memory or has performance benefits is a huge win for
us.

Cheers,
Hunter


#2

On 12/06/06, HH removed_email_address@domain.invalid wrote:

Across all of our sites we’re pumping out about 300k pages per day so
anything that saves memory or has performance benefits is a huge win for us.

Have a look at:

http://blog.innerewut.de/articles/2006/04/21/scaling-rails-with-apache-2-2-mod_proxy_balancer-and-mongrel

if you haven’t already.


#3

On Jun 11, 2006, at 10:36 PM, HH wrote:

anything that saves memory or has performance benefits is a huge
win for us.

Cheers,
Hunter


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

This is definitely one of the best ways to go right now for fast

dependable rails server setups. Here’s an apache2.2 vhost template
for use with mod_proxy_balancer and mongrel_cluster. This config file
also demonstrates how to serve all static and page cached assets with
apache and all dynamic requests with a cluster of mongrels.

http://brainspl.at/articles/2006/06/12/apache2-2-vhost-template-for-
mongrel-clusters

Cheers-
-Ezra


#4

Thanks for this article, Ezra!

On a related topic, I see at the Mongrel site that the docs now warn
people off using Lighttpd to balance.
(http://mongrel.rubyforge.org/docs/lighttpd.html).

How bad are the problems with using Lighttpd & mod_proxy to front a
Mongrel cluster? Anybody out there have a working production site with
that combo? Anybody have a broken production site that you are about
to move off from lightspeed?

phil

Ezra Z. removed_email_address@domain.invalid wrote:
This is definitely one of the best ways to go right now for fast
dependable rails server setups. Here’s an apache2.2 vhost template
for use with mod_proxy_balancer and mongrel_cluster. This config file
also demonstrates how to serve all static and page cached assets with
apache and all dynamic requests with a cluster of mongrels.

http://brainspl.at/articles/2006/06/12/apache2-2-vhost-template-for-
mongrel-clusters

Cheers-
-Ezra


#5

Ezra Z. removed_email_address@domain.invalid wrote:
This is definitely one of the best ways to go right now for fast
dependable rails server setups. Here’s an apache2.2 vhost template
for use with mod_proxy_balancer and mongrel_cluster. This config file
also demonstrates how to serve all static and page cached assets with
apache and all dynamic requests with a cluster of mongrels.

http://brainspl.at/articles/2006/06/12/apache2-2-vhost-template-for-
mongrel-clusters

lightspeed?
The big one is that when Lighty decides that one of the back-ends is
down, it won’t recognize that it is back online until you restart
Lighty. That’s a pretty nasty bug for a cluster front-end to have.
Personally, I just use Pound in front of Mongrel, without Apache or
Lighty. I don’t serve up large static resources, though, so I’m not
necessarily recommending that for everyone.
It is very simple and fast, though.


#6

Wilson B. wrote:

The big one is that when Lighty decides that one of the back-ends is
down, it won’t recognize that it is back online until you restart
Lighty. That’s a pretty nasty bug for a cluster front-end to have.
Yeah that sounds pretty well like a deal-breaker.
Although lightty restarts are pretty quick when it just has to restart
itself…

Personally, I just use Pound in front of Mongrel, without Apache or
Lighty. I don’t serve up large static resources, though, so I’m not
necessarily recommending that for everyone.
It is very simple and fast, though.
Cool. I’ll check out pound before I start playing with apache configs.

Thanks,
phil


#7

Is Mongrel a good replacement for Webrick for development or should we
stick with Webrick during the development phase?


What’s an Intel chip doing in a Mac? A whole lor more that it’s ever
done in a PC.

My Digital Life - http://scottwalter.com/blog
Pro:Blog - http://scottwalter.com/problog
Snippets - http://snippets.scottwalter.com

----- Original Message ----
From: Phillip K. removed_email_address@domain.invalid
To: removed_email_address@domain.invalid
Sent: Monday, June 12, 2006 2:03:42 PM
Subject: Re: [Rails] Mongrel Now Recommended Setup?

Wilson B. wrote:

The big one is that when Lighty decides that one of the back-ends is
down, it won’t recognize that it is back online until you restart
Lighty. That’s a pretty nasty bug for a cluster front-end to have.
Yeah that sounds pretty well like a deal-breaker.
Although lightty restarts are pretty quick when it just has to restart
itself…

Personally, I just use Pound in front of Mongrel, without Apache or
Lighty. I don’t serve up large static resources, though, so I’m not
necessarily recommending that for everyone.
It is very simple and fast, though.
Cool. I’ll check out pound before I start playing with apache configs.

Thanks,
phil


#8

Scott W. wrote:

Is Mongrel a good replacement for Webrick for development or should we
stick with Webrick during the development phase?
They both work fine for most dev purposes. Mongrel is faster.


#9

On Mon, 2006-06-12 at 21:29 +0200, Joe wrote:

to move off from lightspeed?

Yep, I have many sites using Lighttpd, mod_proxy, and Mongrel. Haven’t
had any problems since Zed released a big bug fix a while ago (about 2-3
releases ago I think). I hear pound offers much better proxying.

Joe, when you get a chance, try zapping one of the mongrel backends and
then thrash the site for a bit. Watch the chaos ensue. Lighttpd
basically needs to take the same approach to mod_proxy that it does with
mod_fastcgi and mod_scgi.


Zed A. Shaw


http://mongrel.rubyforge.org/


#10

Phillip K. wrote:

Thanks for this article, Ezra!

On a related topic, I see at the Mongrel site that the docs now warn
people off using Lighttpd to balance.
(http://mongrel.rubyforge.org/docs/lighttpd.html).

How bad are the problems with using Lighttpd & mod_proxy to front a
Mongrel cluster? Anybody out there have a working production site with
that combo? Anybody have a broken production site that you are about
to move off from lightspeed?

Yep, I have many sites using Lighttpd, mod_proxy, and Mongrel. Haven’t
had any problems since Zed released a big bug fix a while ago (about 2-3
releases ago I think). I hear pound offers much better proxying.

Joe


#11

On Jun 12, 2006, at 3:28 PM, Phillip K. wrote:

So is the problem in mod_proxy or deeper in lighttpd? Have the
http://lists.rubyonrails.org/mailman/listinfo/rails
The author of lighty told me that it would be fixed in 1.4.12. But I
have no idea when that will be coming out.

-Ezra


#12

Zed S. removed_email_address@domain.invalid wrote:
Joe, when you get a chance, try zapping one of the mongrel backends and
then thrash the site for a bit. Watch the chaos ensue. Lighttpd
basically needs to take the same approach to mod_proxy that it does with
mod_fastcgi and mod_scgi.

So is the problem in mod_proxy or deeper in lighttpd? Have the mod_proxy
developers totally given up, are they working on this, and are they
soliciting contributions?

In other words, what’s the prognosis, Doc? Is the patient dying or
merely ill? :slight_smile:

phil


#13

Zed S. wrote:

On Mon, 2006-06-12 at 21:29 +0200, Joe wrote:

to move off from lightspeed?

Yep, I have many sites using Lighttpd, mod_proxy, and Mongrel. Haven’t
had any problems since Zed released a big bug fix a while ago (about 2-3
releases ago I think). I hear pound offers much better proxying.

Joe, when you get a chance, try zapping one of the mongrel backends and
then thrash the site for a bit. Watch the chaos ensue. Lighttpd
basically needs to take the same approach to mod_proxy that it does with
mod_fastcgi and mod_scgi.

Heh, yeah, tried that. IIRC, I just couldn’t access the Rails app via
web interface. Also, sometimes mongrel_rails
cluster::[stop|restart]|stop|restart doesn’t kill all the processes
(requiring a kill -9). Happens pretty rarely - usually one mongrel/ruby
process is using tons of memory and won’t stop|restart - think it might
coincide with one of the search engine spiders hammering a site hard.

Joe


#14

On Mon, 2006-06-12 at 15:28 -0700, Phillip K. wrote:

So is the problem in mod_proxy or deeper in lighttpd? Have the
mod_proxy developers totally given up, are they working on this, and
are they soliciting contributions?

In other words, what’s the prognosis, Doc? Is the patient dying or
merely ill? :slight_smile:

No idea, I don’t have time to fix other people’s stuff so I leave it to
the community to come up with what works best for them and then I just
record it. Once everyone realized that mod_proxy didn’t work so well
they started looking at apache again and litespeed and started putting
out some better configurations.

From a Mongrel perspective I could give a rat’s ass. :slight_smile: The whole
point is that Mongrel is HTTP so whatever you want you can use without
much fuss.


Zed A. Shaw


http://mongrel.rubyforge.org/


#15

In regards to using mongrel vs webrick, I did notice that webricks
restrictions on certain words can often make mongrel the choice for
development. For example, the use of the word “Logs” seems to be
disfavoured
by webrick for tablenames and models, etc.


#16

This is a little OT, but I’m wondering if anyone has any suggestions
for an Apache2.2 install on Debian Sarge. I’ve been unable to find any
pre-built packages for it, and I’m a little concerned about rolling my
own because of possible security hazards.

I’m currently using pound, Apache2, and Mongrel, but I’m ending up
doing my vhosting setup in Pound, which the author of Pound strongly
discourages. I’d like to just do it right and get the whole thing
running behind Apache2.2 with mod_proxy_balancer.

Any thoughts are much appreciated!

Thanks,

Matt