Forum: Rails deployment Apache 2.2 / mod_proxy_balancer / mongrel - only proxy to no

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.
89441a6c74647d292f5cc951eae24cfa?d=identicon&s=25 Jack Christensen (Guest)
on 2007-01-25 17:16
(Received via mailing list)
Is there some way to only proxy to non-busy mongrel's? I'm running 6
mongrels, and if 1 is busy 1 out of every 6 next requests will stall.
The other 5 mongrels could easily handle them quickly. I know the
standard answer for long running tasks is a separate worker process, and
that makes sense for really big long running tasks, but for 10-20 second
or so pages it seems a lot of extra work to split the logic into
multiple pieces if there is an easy way to not send more requests to a
busy mongrel.

--
Jack Christensen
jackc@hylesanderson.edu
9b13522e3b75d56c2949a5030eaaff70?d=identicon&s=25 Johan Sørensen (Guest)
on 2007-01-25 18:41
(Received via mailing list)
On Jan 25, 5:16 pm, Jack Christensen <j...@hylesanderson.edu> wrote:
> Is there some way to only proxy to non-busy mongrel's? I'm running 6
> mongrels, and if 1 is busy 1 out of every 6 next requests will stall.
> The other 5 mongrels could easily handle them quickly. I know the
> standard answer for long running tasks is a separate worker process, and
> that makes sense for really big long running tasks, but for 10-20 second
> or so pages it seems a lot of extra work to split the logic into
> multiple pieces if there is an easy way to not send more requests to a
> busy mongrel.

Apache's mod_proxy module (and subsequently mod_proxy_balancer) backend
monitoring is AFAIK limited to only being able to see if a proxy
backend is down. It cannot monitor the load or "busy-ness" of the
backend.

I know HA-Proxy and a bunch of hardware balancers does this, I don't
think nginx, lighttpd and pound does though?
(someone should make a list somewhere with this kinda stuff ;))

So, either switch proxying software, or fix/workaround the original
issue.

JS
6076c22b65b36f5d75c30bdcfb2fda85?d=identicon&s=25 Ezra Zygmuntowicz (Guest)
on 2007-01-25 21:06
(Received via mailing list)
On Jan 25, 2007, at 9:40 AM, Johan Sørensen wrote:

>> multiple pieces if there is an easy way to not send more requests
> think nginx, lighttpd and pound does though?
> (someone should make a list somewhere with this kinda stuff ;))
>
> So, either switch proxying software, or fix/workaround the original
> issue.
>
> JS


  Yeah Haproxy or any hardware load balancer can handle this. Apache,
lighty and nginx don't currently. But Igor, the author of nginx told
me he will add a proxy-max-load directive so you coudl set it to 1
and that mongrel would not get another request until it returns from
the first and the requests would queue in nginx instead of in
mongrel. Probably a week or two before nginx has this built in. This
will give ngixn a significant advantage over apache and lighty.


Cheers-
-- Ezra Zygmuntowicz
-- Lead Rails Evangelist
-- ez@engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)
032fdb4cd4a3c65ebb77846dfa724679?d=identicon&s=25 Joe Noon (joenoon)
on 2007-01-26 01:35
(Received via mailing list)
On 1/25/07, Ezra Zygmuntowicz <ezmobius@gmail.com> wrote:
> >> process, and
> > backend is down. It cannot monitor the load or "busy-ness" of the
>
>
>         Yeah Haproxy or any hardware load balancer can handle this. Apache,
> lighty and nginx don't currently. But Igor, the author of nginx told
> me he will add a proxy-max-load directive so you coudl set it to 1
> and that mongrel would not get another request until it returns from
> the first and the requests would queue in nginx instead of in
> mongrel. Probably a week or two before nginx has this built in. This
> will give ngixn a significant advantage over apache and lighty.
>

Litespeed also handles this internally.

Joe
650c0a24a4f9d8db5f67d589e1233978?d=identicon&s=25 Jarkko Laine (Guest)
on 2007-01-26 08:09
(Received via mailing list)
On Jan 25, 10:04 pm, Ezra Zygmuntowicz <ezmob...@gmail.com> wrote:
>        Yeah Haproxy or any hardware load balancer can handle this. Apache,
> lighty and nginx don't currently. But Igor, the author of nginx told
> me he will add a proxy-max-load directive so you coudl set it to 1
> and that mongrel would not get another request until it returns from
> the first and the requests would queue in nginx instead of in
> mongrel. Probably a week or two before nginx has this built in. This
> will give ngixn a significant advantage over apache and lighty.

That's very cool, Ezra. Do you have any inside knowledge about how
nginx will determine the load of a mongrel? Also, will it work to route
around dead mongrels?

//jarkko
650c0a24a4f9d8db5f67d589e1233978?d=identicon&s=25 Jarkko Laine (Guest)
on 2007-01-26 08:09
(Received via mailing list)
On Jan 25, 10:04 pm, Ezra Zygmuntowicz <ezmob...@gmail.com> wrote:
>        Yeah Haproxy or any hardware load balancer can handle this. Apache,
> lighty and nginx don't currently. But Igor, the author of nginx told
> me he will add a proxy-max-load directive so you coudl set it to 1
> and that mongrel would not get another request until it returns from
> the first and the requests would queue in nginx instead of in
> mongrel. Probably a week or two before nginx has this built in. This
> will give ngixn a significant advantage over apache and lighty.

That's very cool, Ezra. Do you have any inside knowledge about how
nginx will determine the load of a mongrel? Also, will it work to route
around dead mongrels?

//jarkko
6076c22b65b36f5d75c30bdcfb2fda85?d=identicon&s=25 Ezra Zygmuntowicz (Guest)
on 2007-01-26 19:02
(Received via mailing list)
On Jan 25, 2007, at 11:08 PM, Jarkko Laine wrote:

>
> That's very cool, Ezra. Do you have any inside knowledge about how
> nginx will determine the load of a mongrel? Also, will it work to
> route
> around dead mongrels?
>
> //jarkko

  Here is a quote from Igor about this feature:

"I plan to add someting like this:

     upstream name {
         server   host:9000  max_conn=5  max_wait=100  wait_time=60s;
     }
"

  So for mongrel you could set the max_conn to 1. That would make sure
no mongrel gets another request until it returns from whatever it's
doing.


Cheers-
-- Ezra Zygmuntowicz
-- Lead Rails Evangelist
-- ez@engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)
89441a6c74647d292f5cc951eae24cfa?d=identicon&s=25 Jack Christensen (Guest)
on 2007-01-29 15:20
(Received via mailing list)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ezra Zygmuntowicz wrote:
<blockquote cite="midD8008789-374D-4165-B8C9-8F9F53F6080E@gmail.com"
 type="cite">
  <pre wrap="">
On Jan 25, 2007, at 9:40 AM, Johan S&oslash;rensen wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">On Jan 25, 5:16 pm, Jack Christensen <a
class="moz-txt-link-rfc2396E"
href="mailto:j...@hylesanderson.edu">&lt;j...@hylesanderson.edu&gt;</a>
wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">Is there some way to only proxy to non-busy
mongrel's? I'm running 6
mongrels, and if 1 is busy 1 out of every 6 next requests will stall.
The other 5 mongrels could easily handle them quickly. I know the
standard answer for long running tasks is a separate worker
process, and
that makes sense for really big long running tasks, but for 10-20
second
or so pages it seems a lot of extra work to split the logic into
multiple pieces if there is an easy way to not send more requests
to a
busy mongrel.
      </pre>
    </blockquote>
    <pre wrap="">Apache's mod_proxy module (and subsequently
mod_proxy_balancer)
backend
monitoring is AFAIK limited to only being able to see if a proxy
backend is down. It cannot monitor the load or "busy-ness" of the
backend.

I know HA-Proxy and a bunch of hardware balancers does this, I don't
think nginx, lighttpd and pound does though?
(someone should make a list somewhere with this kinda stuff ;))

So, either switch proxying software, or fix/workaround the original
issue.

JS
    </pre>
  </blockquote>
  <pre wrap=""><!---->

  Yeah Haproxy or any hardware load balancer can handle this. Apache,
lighty and nginx don't currently. But Igor, the author of nginx told
me he will add a proxy-max-load directive so you coudl set it to 1
and that mongrel would not get another request until it returns from
the first and the requests would queue in nginx instead of in
mongrel. Probably a week or two before nginx has this built in. This
will give ngixn a significant advantage over apache and lighty.
  </pre>
</blockquote>
<br>
Thanks. That sounds ideal. I will definitely keep an eye open for this
feature.<br>
<blockquote cite="midD8008789-374D-4165-B8C9-8F9F53F6080E@gmail.com"
 type="cite">
  <pre wrap="">

Cheers-
-- Ezra Zygmuntowicz
-- Lead Rails Evangelist
-- <a class="moz-txt-link-abbreviated"
href="mailto:ez@engineyard.com">ez@engineyard.com</a>
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)





  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Jack Christensen
<a class="moz-txt-link-abbreviated"
href="mailto:jackc@hylesanderson.edu">jackc@hylesanderson.edu</a></pre>
<br>
--~--~---------~--~----~------------~-------~--~----~<br>
You received this message because you are subscribed to the Google
Groups &quot;Deploying Rails&quot; group. <br> To post to this group,
send email to rubyonrails-deployment@googlegroups.com <br> To
unsubscribe from this group, send email to
rubyonrails-deployment-unsubscribe@googlegroups.com <br> For more
options, visit this group at
http://groups.google.com/group/rubyonrails-deployment?hl=en <br>
-~----------~----~----~----~------~----~------~--~---<br>
</body>
</html>
<br>
This topic is locked and can not be replied to.