mod_proxy_balancer requires the service of mod_proxy, and it provides load balancing for all the supported protocols.
mod_proxy_balancer has following scheduling algorithm
- mod_lbmethod_byrequests
- mod_lbmethod_bytraffic
- mod_lbmethod_bybusyness
- mod_lbmethod_heartbeat
Followings are the example of a balancer configuration:
<Proxy "balancer://mycluster"> BalancerMember "http://192.168.1.50:80" BalancerMember "http://192.168.1.51:80" </Proxy> ProxyPass "/test" "balancer://mycluster" ProxyPassReverse "/test" "balancer://mycluster"
Followings are another example of balancer configuration:
<Proxy balancer://mycluster> # WAS1 BalancerMember http://192.168.10.7:80 route=1 connectiontimeout=1 # WAS2 BalancerMember http://192.168.10.8:80 route=2 connectiontimeout=1 ProxySet lbmethod=byrequests ProxySet stickysession=ROUTEID </Proxy>