we have got 3 active Tomcat instances, the load should be distributed evenly amongst them (sticky sessions via jvmroute, ajp).
We also have got 3 failover Tomcat instances running. If one of the 3 active instances fails, one of the 3 failover instances should take over.
I would like to use Apache2 with a load balancing module in order to configure load balancing and failover.
Is it possible to achieve this within only one Apache2 instance?
I thought about a configuration like the one below, but I neither know if it would work, nor if it would be recommended to do it this way.
<Proxy balancer://Group1>
BalancerMember ajp://destination1 route=core1
BalancerMember ajp://destination4 route=core1 status=+H
</Proxy>
<Proxy balancer://Group2>
BalancerMember ajp://destination1 route=core2
BalancerMember ajp://destination4 route=core2 status=+H
</Proxy>
<Proxy balancer://Group3>
BalancerMember ajp://destination1 route=core3
BalancerMember ajp://destination4 route=core3 status=+H
</Proxy>
<Proxy balancer://loadbalancing>
BalancerMember balancer://Group1 route=core1
BalancerMember balancer://Group2 route=core2
BalancerMember balancer://Group3 route=core3
</Proxy>
ProxyPass / balancer://loadbalancing/ stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse / balancer://loadbalancing/ nofailover=On