You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Israel Timoteo <it...@me.com> on 2014/08/28 02:07:50 UTC
[users@httpd] Apache as Load Balancer question
Hello,
I’m using Apache as a Load Balancer and have a question regarding the Balancer configuration on version 2.2.24 (Mac OS 10.8.5).
This is my scenario: When some of the members in the group are down, sometimes the LB does not take the request and the client gets a timeout; if I remove those members from the config and restart Apache, all the requests are served (my configuration for the LB is below).
Is my configuration missing something? maybe a retry or other timeout param?
[=== START CONFIGURATION ===]
<IfModule mod_proxy.c>
ProxyPreserveHost On
ProxyRequests Off
ProxyReceiveBufferSize 2048
ProxyTimeout 300
Header add Set-Cookie "JSESSIONID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
ProxyPass /balancer-manager !
ProxyPass / balancer://cluster-ca/
ProxyPassReverse / balancer://cluster-ca/
<Proxy balancer://cluster-ca stickysession=JSESSIONID|jsessionid timeout=300 nofailover=Off>
BalancerMember ajp://10.163.47.13:8009 loadfactor=1 route=ACIVRCAPRN01 ttl=60
BalancerMember ajp://10.163.47.14:8009 loadfactor=1 route=ACIVRCAPRN02 ttl=60
BalancerMember ajp://10.163.47.15:8009 loadfactor=1 route=ACIVRCAPRN03 ttl=60
BalancerMember ajp://10.163.47.16:8009 loadfactor=1 route=ACIVRCAPRN04 ttl=60
BalancerMember ajp://10.163.47.17:8009 loadfactor=1 route=ACIVRCAPRN05 ttl=60
BalancerMember ajp://10.163.47.18:8009 loadfactor=1 route=ACIVRCAPRN06 ttl=60
ProxySet lbmethod=byrequests
</Proxy>
<Location /balancer-manager>
SetHandler balancer-manager
Order Deny,Allow
Allow from all
AuthType Basic
AuthName "Cluster manager "
AuthUserFile /etc/apache2/.httpasswd
Require valid-user
</Location>
</IfModule>
[=== END CONFIGURATION ===]
I appreciate any comment you can share with me.
Regards,
Israel Timoteo
Re: [users@httpd] Apache as Load Balancer question
Posted by Daniel Ruggeri <DR...@primary.net>.
Hi;
You will also need to bump your version to 2.2.25 as failontimeout
was not backported until then.
--
Daniel Ruggeri
On 8/28/2014 8:01 AM, Daniel wrote:
> Try with failontimeout option set to on, by default it is "Off"
>
>
> 2014-08-28 2:07 GMT+02:00 Israel Timoteo <itimoteo@me.com
> <ma...@me.com>>:
>
> Hello,
>
> I’m using Apache as a Load Balancer and have a question regarding
> the Balancer configuration on version 2.2.24 (Mac OS 10.8.5).
>
> This is my scenario: When some of the members in the group are
> down, sometimes the LB does not take the request and the client
> gets a timeout; if I remove those members from the config and
> restart Apache, all the requests are served (my configuration for
> the LB is below).
>
> Is my configuration missing something? maybe a retry or other
> timeout param?
>
>
> [=== START CONFIGURATION ===]
>
> <IfModule mod_proxy.c>
> ProxyPreserveHost On
> ProxyRequests Off
> ProxyReceiveBufferSize 2048
> ProxyTimeout 300
>
> Header add Set-Cookie "JSESSIONID=.%{BALANCER_WORKER_ROUTE}e;
> path=/" env=BALANCER_ROUTE_CHANGED
> ProxyPass /balancer-manager !
>
> ProxyPass / balancer://cluster-ca/
> ProxyPassReverse / balancer://cluster-ca/
> <Proxy balancer://cluster-ca stickysession=JSESSIONID|jsessionid
> timeout=300 nofailover=Off>
>
> BalancerMember ajp://10.163.47.13:8009 loadfactor=1
> route=ACIVRCAPRN01 ttl=60
> BalancerMember ajp://10.163.47.14:8009 loadfactor=1
> route=ACIVRCAPRN02 ttl=60
> BalancerMember ajp://10.163.47.15:8009 loadfactor=1
> route=ACIVRCAPRN03 ttl=60
> BalancerMember ajp://10.163.47.16:8009 loadfactor=1
> route=ACIVRCAPRN04 ttl=60
> BalancerMember ajp://10.163.47.17:8009 loadfactor=1
> route=ACIVRCAPRN05 ttl=60
> BalancerMember ajp://10.163.47.18:8009 loadfactor=1
> route=ACIVRCAPRN06 ttl=60
>
> ProxySet lbmethod=byrequests
> </Proxy>
>
> <Location /balancer-manager>
> SetHandler balancer-manager
> Order Deny,Allow
> Allow from all
>
> AuthType Basic
> AuthName "Cluster manager "
> AuthUserFile /etc/apache2/.httpasswd
> Require valid-user
>
> </Location>
>
> </IfModule>
>
>
> [=== END CONFIGURATION ===]
>
>
> I appreciate any comment you can share with me.
>
>
> Regards,
>
> Israel Timoteo
>
>
Re: [users@httpd] Apache as Load Balancer question
Posted by Daniel <df...@gmail.com>.
Try with failontimeout option set to on, by default it is "Off"
2014-08-28 2:07 GMT+02:00 Israel Timoteo <it...@me.com>:
> Hello,
>
> I’m using Apache as a Load Balancer and have a question regarding the
> Balancer configuration on version 2.2.24 (Mac OS 10.8.5).
>
> This is my scenario: When some of the members in the group are down,
> sometimes the LB does not take the request and the client gets a timeout;
> if I remove those members from the config and restart Apache, all the
> requests are served (my configuration for the LB is below).
>
> Is my configuration missing something? maybe a retry or other timeout
> param?
>
>
> [=== START CONFIGURATION ===]
>
> <IfModule mod_proxy.c>
> ProxyPreserveHost On
> ProxyRequests Off
> ProxyReceiveBufferSize 2048
> ProxyTimeout 300
>
> Header add Set-Cookie "JSESSIONID=.%{BALANCER_WORKER_ROUTE}e; path=/"
> env=BALANCER_ROUTE_CHANGED
> ProxyPass /balancer-manager !
>
> ProxyPass / balancer://cluster-ca/
> ProxyPassReverse / balancer://cluster-ca/
> <Proxy balancer://cluster-ca stickysession=JSESSIONID|jsessionid
> timeout=300 nofailover=Off>
>
> BalancerMember ajp://10.163.47.13:8009 loadfactor=1 route=ACIVRCAPRN01
> ttl=60
> BalancerMember ajp://10.163.47.14:8009 loadfactor=1 route=ACIVRCAPRN02
> ttl=60
> BalancerMember ajp://10.163.47.15:8009 loadfactor=1 route=ACIVRCAPRN03
> ttl=60
> BalancerMember ajp://10.163.47.16:8009 loadfactor=1 route=ACIVRCAPRN04
> ttl=60
> BalancerMember ajp://10.163.47.17:8009 loadfactor=1 route=ACIVRCAPRN05
> ttl=60
> BalancerMember ajp://10.163.47.18:8009 loadfactor=1 route=ACIVRCAPRN06
> ttl=60
>
> ProxySet lbmethod=byrequests
> </Proxy>
>
> <Location /balancer-manager>
> SetHandler balancer-manager
> Order Deny,Allow
> Allow from all
>
> AuthType Basic
> AuthName "Cluster manager "
> AuthUserFile /etc/apache2/.httpasswd
> Require valid-user
>
> </Location>
>
> </IfModule>
>
>
> [=== END CONFIGURATION ===]
>
>
> I appreciate any comment you can share with me.
>
>
> Regards,
>
> Israel Timoteo
>