You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by S Sathyesh <s....@tcs.com> on 2012/07/27 08:32:09 UTC

Regarding mod_proxy Load Balancing in Apache httpd 2.2.22 with mod_ssl

Hi 

I am using Apache httpd 2.2.22 for load balancing the two jboss App server 
using AJP protocol.(See Below for Code).


I am using byrequests algorithm  for load balancing with default load 
factor 1 for each App Server.

If one request is going to Node 1 ,Second request from different session 
must go to Node 2. But this not happening.

Requests are going to Node 1  after some few hours it is going to Node 2.

Load Balancing Method always prefers Node 1. 

Should i change anything in below configuration to work load balancing 
perfectly.

**********************************************************************************************************************

ProxyRequests Off

<Proxy *>

          Order deny,allow

          Allow from all

</Proxy>
 
 ProxyPreserveHost On
 ProxyErrorOverride On
 LimitRequestFieldSize 20480 
 ProxyIOBufferSize 21504
 TimeOut 600

 
 ProxyPassMatch ^(/.*\.gif)$ !
 ProxyPassMatch ^(/.*\.js)$ !
 ProxyPassMatch ^(/.*\.css)$ !
 ProxyPassMatch ^(/.*\.html)$ !
 
 
     Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" 
env=BALANCER_ROUTE_CHANGED

    <Proxy balancer://mycluster>

               Order deny,allow

               Allow from all

               #For Example   ajp://172.16.109.32:8012 route=node1 
 
                BalancerMember ajp://172.16.109.32:8008  route=node1 
                BalancerMember ajp://172.16.109.34:8009  route=node2
 
               ProxySet lbmethod=byrequests
               ProxySet stickysession=ROUTEID
               ProxySet nofailover=Off
               ProxySet maxattempts=1
 
 
    </Proxy>
 
 
    ProxyPass  /balancer-manager ! 
 
 
    ProxyPass /  balancer://mycluster/ 
 
 
 
 
    <Location /balancer-manager>

          SetHandler balancer-manager

          Order deny,allow

          Allow from all

    </Location>
 

***************************************************************************************************************************
Regards,
S Sathyesh
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



Re: Regarding mod_proxy Load Balancing in Apache httpd 2.2.22 with mod_ssl

Posted by Jeff Trawick <tr...@gmail.com>.
This mailing list is for notifications from the bug db, not for new
bug reports or discussions of existing bugs.

Report bugs at http://issues.apache.org/bugzilla/

On Fri, Jul 27, 2012 at 2:32 AM, S Sathyesh <s....@tcs.com> wrote:
> Hi
>
> I am using Apache httpd 2.2.22 for load balancing the two jboss App server
> using AJP protocol.(See Below for Code).
>
>
> I am using byrequests algorithm  for load balancing with default load factor
> 1 for each App Server.
>
> If one request is going to Node 1 ,Second request from different session
> must go to Node 2. But this not happening.
>
> Requests are going to Node 1  after some few hours it is going to Node 2.
>
> Load Balancing Method always prefers Node 1.
>
> Should i change anything in below configuration to work load balancing
> perfectly.
>
> **********************************************************************************************************************
>
> ProxyRequests Off
>
> <Proxy *>
>
>           Order deny,allow
>
>           Allow from all
>
> </Proxy>
>
>  ProxyPreserveHost On
>  ProxyErrorOverride On
>  LimitRequestFieldSize 20480
>  ProxyIOBufferSize 21504
>  TimeOut 600
>
>
>  ProxyPassMatch ^(/.*\.gif)$ !
>  ProxyPassMatch ^(/.*\.js)$ !
>  ProxyPassMatch ^(/.*\.css)$ !
>  ProxyPassMatch ^(/.*\.html)$ !
>
>
>      Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/"
> env=BALANCER_ROUTE_CHANGED
>
>     <Proxy balancer://mycluster>
>
>                Order deny,allow
>
>                Allow from all
>
>                #For Example   ajp://172.16.109.32:8012 route=node1
>
>                 BalancerMember ajp://172.16.109.32:8008  route=node1
>                 BalancerMember ajp://172.16.109.34:8009  route=node2
>
>                ProxySet lbmethod=byrequests
>                ProxySet stickysession=ROUTEID
>                ProxySet nofailover=Off
>                ProxySet maxattempts=1
>
>
>     </Proxy>
>
>
>     ProxyPass  /balancer-manager !
>
>
>     ProxyPass /  balancer://mycluster/
>
>
>
>
>     <Location /balancer-manager>
>
>           SetHandler balancer-manager
>
>           Order deny,allow
>
>           Allow from all
>
>     </Location>
>
>
> ***************************************************************************************************************************
> Regards,
> S Sathyesh
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you



-- 
Born in Roswell... married an alien...
http://emptyhammock.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org