Try OpenEdge Now
skip to main content
Administration Guide
Load balancing options for PAS for OpenEdge : Tomcat load balancing : Configuring an Apache Web server for Tomcat load balancing
 

Configuring an Apache Web server for Tomcat load balancing

Apache Web server configuration for Tomcat load balancing involves enabling the AJP13 protocol for communicating with the load balancer and adding a number of definitions that reference the load balancer.
Note: Tomcat load balancing can be done with Web servers other than Apache. However, only Apache configuration is described here because Apache is arguably the most common Web server, and it is not practicable to describe the configuration details of all the available Web servers.
Basically, you do the following:
1. Open Apache's /conf/httpd.conf file and un-comment theLoadModule directives in the Apache Web server's httpd.conf file that enable AJP13. The LoadModule directives include:
*LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
*LoadModule proxy_balancer_module modules/mod_proxy_balancer.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.
2. Add the following definitions to /conf/httpd.conf:
#workers.properties load balancing config

LoadModule jk_module apache_install_dir/modules/mod_jk.so
JkWorkersFile apache_install_dir/conf/workers.properties
JkShmFile apache_install_dir/logs/mod_jk.shm
JkLogFile apache_install_dir/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkMount /* jklb
3. Use TCMAN to enable the AJP13 port in the /conf/server.xml file.
For example:
instance/bin/tcman feature AJP13=on
Apache now passes all requests to a PAS for OpenEdge load balancing instance via its AJP13 port.
Note: The PAS for OpenEdge load balancing instance is referenced in the example above as jklb (JkMount /* jklb). The actual instance name must be lb.