httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <tevans...@googlemail.com>
Subject Re: [users@httpd] Load balancing proxy pass and reverse proxy pass
Date Mon, 14 Mar 2011 15:13:45 GMT
On Mon, Mar 14, 2011 at 2:59 PM, aparna aryan <aparnapuram@gmail.com> wrote:
> Hello,
>
> Our application is running with a apache webserver and 2 instances of
> weblogic server.
>
> localhost1- weblogic
> localhost2 - weblogic
>
> Now we are trying to replace localhost2 with tomcat and do clustering.
>
> The following configuration was with out clustering :
>
> We have the following configuration :
>
> Load balancing for localhost1 was done here.
>
>  <Proxy balancer://cluster>
>          BalancerMember ajp://localhost1:port/xxx route=server_1
> loadfactor=33 retry=60
>          BalancerMember ajp://localhost1:port/xxx route=server_2
> loadfactor=33 retry=60
>          BalancerMember ajp://localhost1:port/xxx route=server_3
> loadfactor=33 retry=60
>          BalancerMember ajp://localhost1:port/xxx route=server_4
> loadfactor=33 retry=60
>          BalancerMember ajp://localhost1:port/xxx route=server_5
> loadfactor=33 retry=60
>
>          #load balancing performed based on number of user requests
>          ProxySet lbmethod=byrequests
>          # Report server is for Report purpose only so balancing is required
> now.
>           </Proxy>
>
> requests to localhost2 are forwarded only when user requests for certain
> functionality after logging in to localhost1. i.e..when a user hits the dns,
> the request is forwarded to one of the localhost1s that are clustered and
> from there when the user is trying to access certain pages, The request will
> be redirected to localhost2s via proxy pass settings that are set as
> following :
>
>  ProxyPass /xxx/xxx//viewGenericReport.jsp
> http://localhost2:xxx/eMatrix/jsp/mars/general/genericReport/viewGenericReport.
> jsp
>             ProxyPassReverse
> /eMatrix/jsp/mars/general/genericReport/viewGenericReport.jsp
> http://localhost2:xxx/viewGenericReport.jsp
>             ProxyPass
> /eMatrix/jsp/mars/general/genericReport/viewGenericReportnogzip.jsp
> http://localhost2:xxx/eMatrix/jsp/viewGenericReportnogzip.jsp
>             ProxyPassReverse
> /eMatrix/jsp/mars/general/genericReport/viewGenericReportnogzip.jsp
> http://localhost2:xxx/viewGenericReportnogzip.jsp
>             ProxyPass //hybridReport/ http://localhost2:xxx//hybridReport
>         ProxyPassReverse /hybridReport/ http://localhost2:xxx/hybridReport/
>         ProxyPass /CRReport.jsp http://localhost2:xxx/CRReport.jsp
>         ProxyPassReverse /CRReport.jsp http://localhost2:xxx//CRReport.jsp
>         ProxyPass /crProcessForwardReport.jsp
> http://localhost2:xxx/crProcessForwardReport.jsp
>         ProxyPassReverse /crProcessForwardReport.jsp
> http://localhost2:xxx/crProcessForwardReport.jsp
>         ProxyPass /iaProcessForwardReport.jsp
> http://localhost2:xxx/iaProcessForwardReport.jsp
>         ProxyPassReverse /iaProcessForwardReport.jsp
> http://localhost2:xxx//iaProcessForwardReport.jsp
>
>
> Please let us know how to load balance localhost2s....
>
>

You do it exactly the same as you did for localhost1 (awful names btw!).

1) Define a <Proxy balancer://foo> cluster
2) Adjust your ProxyPass rules to refer to this cluster instead of a
named backend.

Eg:

<Proxy balancer://backend2>
...
</Proxy>

ProxyPass /iaProcessForwardReport.jsp
balancer://backend2/iaProcessForwardReport.jsp

etc

Cheers

Tom

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message