[users@httpd] Proxying and load balancing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

  I am trying to set up httpd (v2.2.0) as a load balancer (for development testing, poc stuff) using the mod_proxy_balancer (and appropriate dependencies).  I am fronting a J2EE applications running under tomcat 5.5.15 on two machines.

  I seem to have it working for the most part, but am confused by  a couple of things:

1. The URL in the web browser changes when I access the LB, that is the LB actually does a client side redirect:
For example the URL I use is
  192.168.1.1:8080/myProject
but when the page renders, the URL is now
  192.168.1.2:8080/myProject
or
  192.168.1.3:8080/myProject

What I want to achieve is, have the URL remain in the context of the LB/proxy (or reverse proxy), so that if machine 1 goes away the LB can redirect to another machine.  'Cause right now the user will have to enter the URL of the LB to get to the app if something fails.

2. In the segment below, there is a section "<Location /tc-bal>" that seems to be needed.  I do not understand why?  I crafted this using the examples config files with the install for win32.

  Thx in advance for help ...

Regards,
Douglas WF Acheson

<!-- snip snip -->
<IfModule !proxy_module>
    LoadModule proxy_module modules/mod_proxy.so
</IfModule>

#<IfModule !proxy_ajp_module>
#    LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
#</IfModule>

<IfModule !proxy_http_module>
    LoadModule proxy_http_module modules/mod_proxy_http.so
</IfModule>

<IfModule !proxy_balancer_module>
    LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
</IfModule>

# ---------------------------------------------------------------------------- #
# Define the tomcat load balancer                                              #
# ---------------------------------------------------------------------------- #

<IfModule proxy_balancer_module>
	ProxyRequests off

  <Proxy balancer://bpsCluster>
      BalancerMember http://192.168.1.1:8080 loadfactor=50
      BalancerMember http://192.168.1.3:8080 loadfactor=50
      Order Deny,Allow
      Allow from all
  </Proxy>

  <Location /tc-bal>
      ProxyPass balancer://myCluster stickysession=jsessionid
  </Location>

  <Location /balancer-manager>
      SetHandler balancer-manager
      Order Deny,Allow
      Allow from all
  </Location>

  <Location /BpsProject>
      ProxyPass balancer://myCluster/myProject
      ProxyPassReverse balancer://myCluster/myProject
      Order Deny,Allow
      Allow from all
  </Location>

</IfModule>

Regards,
Douglas WF Acheson 



---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux