Search code examples
apachehttpd.confmod-proxy-balancer

Multiple load balancer using mod_proxy_balancer on httpd


Understand that to use mod_proxy_balancer on httpd via ajp, configuration is as follow:

<Proxy balancer://mycluster>
      BalancerMember ajp://public1.yourcompany.com:8009 route=public1
      BalancerMember ajp://public2.yourcompany.com:8009 route=public2
      ProxySet lbmethod=byrequests
</Proxy>

However in my case, i need to have 2 clusters, so i'm thinking to create 2 Proxies like this:

<Proxy balancer://mycluster>
  BalancerMember ajp://public1.yourcompany.com:8009 route=public1
  BalancerMember ajp://public2.yourcompany.com:8009 route=public2
  ProxySet lbmethod=byrequests
</Proxy>
<Proxy balancer://my2ndcluster>
  BalancerMember ajp://public3.yourcompany.com:8009 route=public1
  BalancerMember ajp://public4.yourcompany.com:8009 route=public2
  ProxySet lbmethod=byrequests
</Proxy>

However with this httpd failed to start.

Anyway for me to configure this?

Thank you


Solution

  • Found the issue that is not related to the proxy settings. After fixing the problem and changing the route ID as suggested, the proxy worked as expected.