Module mod_proxy_balancer

Module mod_proxy_balancer does not provide directives for the IBM® HTTP Server for i Web server.

Summary

The Proxy balancer module requires the service of mod_proxy and it provides load balancing support for HTTP, FTP and WebSocket protocols.

The load balancer enables requests to be shared among workers via three methods, Request Counting, Weighted Traffic Counting and Pending Request Counting. The default Request counting just counts the number of requests and distributes requests across workers until they have each served an equal number of requests. These methods are controlled via the lbmethod value of the Balancer definition. See the ProxyPass directive for more information, especially regarding how to configure the Balancer and BalancerMembers.

Load balancing scheduler algorithm is now provided by modules: mod_lbmethod_byrequests, mod_lbmethod_bytraffic and mod_lbmethod_bybusyness. In order to get the ability of load balancing, mod_proxy, mod_proxy_balancer, and at least one of load balancing scheduler algorithm modules have to be loaded. For example:

LoadModule proxy_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM
LoadModule proxy_ftp_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM
LoadModule proxy_http_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM
LoadModule proxy_connect_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM 
LoadModule proxy_balancer_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM
LoadModule lbmethod_byrequests_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM

If you are using proxy load balancing with a Proxy directive scheme that starts with balancer://, you will need to specify the working members of the cluster. The balancer://xxx specification refers to a virtual worker that gets created. It does not really communicate with the backend server but is responsible for the management of several "real" workers. A special set of parameters can be added to this virtual worker. The "real" worker is a member of the load balancer, usually a remote host serving one of the supported protocols. Review ProxyPass directive for all of the allowed parameters.

The Proxy balancer module supports two ways of implementing stickyness: cookie based and URL encoding based. For example:

ProxyPass "/test" "balancer://mycluster" stickysession=JSESSIONID|jsessionid scolonpathdelim=On
<Proxy "balancer://mycluster">
    BalancerMember "http://192.168.1.50:80" route=node1
    BalancerMember "http://192.168.1.51:80" route=node2
</Proxy>