Try OpenEdge Now
skip to main content
Administration Guide
Load balancing options for PAS for OpenEdge : Apache proxy host load balancing : Configuring the Apache server for proxy load balancing
 

Configuring the Apache server for proxy load balancing

Configuring an Apache HTTP Server to implement load balancing involves updating the apache_install_dir/conf/httpd.conf file to:
*Specify the proxy modules to load
*Reference the PAS for OpenEdge instances
*Enable or disable sticky sessions
Note: In addition to configuring the Apache server, you must configure each PAS for OpenEdge instance. See Configuring PAS for OpenEdge instances for proxy load balancing

Loading proxy modules

Proxy modules set up the Apache Web server as a proxy to handle requests to multiple PAS for OpenEdge instances. The modules are loaded by un-commenting LoadModule directives in the Apache Web server's httpd.conf file. The LoadModule directives include:
*LoadModule proxy_module modules/mod_proxy.so
*LoadModule proxy_connect_module modules/mod_proxy_connect.so
*LoadModule proxy_http_module modules/mod_proxy_http.so
*LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
*LoadModule bmethod_byrequests_module modules/mod_lbmethod_byrequests.so
Note: Depending on which version of the Apache server you are using, there may be additional modules required. See the Apache Web site (http://httpd.apache.org/) for documentation on your version of the Apache server.

Referencing instances and configuring session types

Update Apache’s httpd.conf file to include a load balancer section that lists the PASOE instances in the load balancing group. This can be configured two different ways:
*Session free — any request can be sent to any PAS for OpenEdge instance.
*Sticky session — once a session is started all requests return to the same PAS for OpenEdge instance until the session is terminated
If there is no need for client requests to return the the same PAS for OpenEdge instance (i.e. maintaining server-side context is not required), your entries in httpd.conf should resemble the following example:
#Load balancer Proxy settings (session free)
<Proxy "balancer://mylbgroup">
BalancerMember "http://172.16.21.39:11600"
BalancerMember "http://172.16.21.39:11610"
BalancerMember "http://172.16.21.39:11620"
</Proxy>
ProxyPass "/test" "balancer://mylbgroup"
ProxyPassReverse "/test" "balancer://mylbgroup"
Notice that, in the example above, the instances where Apache can refer requests are grouped as //mylbgroup and the URL of these instances (the BalancerMember properties) are specified.
If it is necessary for sequential requests to go to the same instance, you enable sticky sessions by adding a route property to BalancerMember and by enabling JSESSIONID cookies. For example:
#Load balancer Proxy settings (sticky sessions)
<Proxy "balancer://mylbgroup">
BalancerMember "http://172.16.21.39:11600" route=oepas1
BalancerMember "http://172.16.21.39:11610" route=oepas2
BalancerMember "http://172.16.21.39:11620" route=oepas3
</Proxy>
ProxyPass "/test" "balancer://mylbgroup" stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse "/test" "balancer://mylbgroup"
In the example above notice that:
*The route property must match the jvmroute value in the instance's server.xml file.
*The stickysession property enables the JSESSIONID cookie, which is the mechanism used to identify the session.
Note: For more information about session configurations in the httpd.conf file, see the Apache Web site (http://httpd.apache.org/) for documentation on your version of the Apache server,