What is mod_proxy_balancer?
Requirements and installation
- an Apache HTTP Server installation version 2.1 or later (at the time of writing, 2.2.15 is the latest version available);
- mod_proxy extension.
./configure --enable-proxy --enable-proxy-balancer[run./configure-h to list all the available options]makemake install
Basic configuration
Include conf/extra/httpd-proxy-balancer.conf<Proxy balancer://mycluster>BalancerMember http://wn1.seco.comBalancerMember http://wn2.seco.com</Proxy>ProxyPass /test balancer://myclusterLoad balancer methods
- byrequests: weighted request count balancing;
- bytraffic: weighted traffic byte count balancing;
- bybusyness: pending request balancing.
<Proxy balancer://mycluster>...lbmethod=method</Proxy><Proxy balancer://mycluster>BalancerMember http://wn1.seco.com loadfactor=3BalancerMember http://wn2.seco.com loadfactor=7lbmethod=byrequests</Proxy>Session management
<Proxy balancer://mycluster>BalancerMember http://wn1.seco.com loadfactor=3 route=seco1BalancerMember http://wn2.seco.com loadfactor=7 route=seco2</Proxy>SESSION_ID=<value>.<route>ProxyPass /test balancer://mycluster stickysession=SESSION_IDBalancer manager
<Location /balancer-manager>SetHandler balancer-managerOrder Deny,AllowAllow from all</Location>
Comments
Leave a comment Trackback