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.
Jack C. (Guest)
on 2007-01-25 18: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 C.
removed_email_address@domain.invalid
Johan Sørensen (Guest)
on 2007-01-25 19:41
(Received via mailing list)
On Jan 25, 5:16 pm, Jack C. <removed_email_address@domain.invalid> 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
Ezra Z. (Guest)
on 2007-01-25 22: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 Z.
-- Lead Rails Evangelist
-- removed_email_address@domain.invalid
-- Engine Y., Serious Rails Hosting
-- (866) 518-YARD (9273)
Joe N. (Guest)
on 2007-01-26 02:35
(Received via mailing list)
On 1/25/07, Ezra Z. <removed_email_address@domain.invalid> 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
Jarkko L. (Guest)
on 2007-01-26 09:09
(Received via mailing list)
On Jan 25, 10:04 pm, Ezra Z. <removed_email_address@domain.invalid> 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
Jarkko L. (Guest)
on 2007-01-26 09:09
(Received via mailing list)
On Jan 25, 10:04 pm, Ezra Z. <removed_email_address@domain.invalid> 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
Ezra Z. (Guest)
on 2007-01-26 20:02
(Received via mailing list)
On Jan 25, 2007, at 11:08 PM, Jarkko L. 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 Z.
-- Lead Rails Evangelist
-- removed_email_address@domain.invalid
-- Engine Y., Serious Rails Hosting
-- (866) 518-YARD (9273)
Jack C. (Guest)
on 2007-01-29 16: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 Z. wrote:
<blockquote cite="removed_email_address@domain.invalid"
 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 C. <a
class="moz-txt-link-rfc2396E"
href="mailto:removed_email_address@domain.invalid">&lt;removed_email_address@domain.invalid&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="removed_email_address@domain.invalid"
 type="cite">
  <pre wrap="">

Cheers-
-- Ezra Z.
-- Lead Rails Evangelist
-- <a class="moz-txt-link-abbreviated"
href="mailto:removed_email_address@domain.invalid">removed_email_address@domain.invalid</a>
-- Engine Y., Serious Rails Hosting
-- (866) 518-YARD (9273)





  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Jack C.
<a class="moz-txt-link-abbreviated"
href="mailto:removed_email_address@domain.invalid">removed_email_address@domain.invalid</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 removed_email_address@domain.invalid <br> To
unsubscribe from this group, send email to
removed_email_address@domain.invalid <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.