webMethods, OneData, and Terracotta  10.2 | Managing Master Data with webMethods OneData | Administering webMethods OneData | Clustering OneData | Installing and Setting Up OneData Clustering | Configuring Tomcat Workers for Load Balancing
 
Configuring Tomcat Workers for Load Balancing
 
Worker Properties File Reference
Prerequistes: Preparing Apache Web Server as a Load Balancer
A Tomcat worker is a Tomcat instance that runs behind a web server such as Apache. The web server forwards the servlet requests to the worker and the worker executes the servlets or any other content on behalf of the web server.
In a clustered OneData environment, you must configure one Tomcat worker as a load balancer worker and configure multiple Tomcat workers to distribute the requests between them. The load balancer is a worker that does not directly communicate with Tomcat. Instead, it manages several real workers, called members or sub workers of the load balancer. You can configure the workers for the Tomcat web server plug-in by defining them in the workers.properties file. For more information about the workers.properties file, see the Apache documentation.
This topic describes how to configure two workers and a load balancer worker. You can configure as many workers as required in your cluster environment.
Note: If you are configuring workers for the first time, follow this procedure. Otherwise, see Adding a OneData Instance to the Cluster.
* To configure workers for load balancing
1. In the load balancer machine, open a text editor.
2. Copy and paste the following configuration details to create a workers.properties file.
# Define 1 real worker using ajp13
worker.list=balancer
worker.balancer.type=lb
worker.balancer.balance_workers=worker1,worker2
worker.balancer.method=B
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=<Host IP>
worker.worker1.port=<AJP Port>|
worker.worker1.lbfactor=1
# Set properties for worker2 (ajp13)
worker.worker2.type=ajp13
worker.worker2.host=<Host IP>
worker.worker2.port=<AJP Port>
worker.worker2.lbfactor=1
3. Change the values for Host IP and AJP Port in the above configuration based on the clustering environment you want to set up.
Host IP is the IP address of the cluster node in which the OneData instance is installed. AJP Port is the port the load balancer uses to communicate with a OneData instance.
Important: You must use the same worker names in all the configurations. balancer, worker1 and worker2 are the worker names that you can choose.
4. Save the file as workers.properties in the folder where the httpd.conf file is located. Typically, this is in the folder apache_server_root\conf.
5. Go to apache_server_root\conf, and open the httpd.conf file.
6. Make the following changes in the httpd.conf file:
a. Uncomment the following lines:
LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.soLoadModule slotmem_shm_module modules/mod_slotmem_shm.so LoadModule proxy_module modules/mod_proxy.soLoadModule proxy_ajp_module modules/mod_proxy_ajp.soLoadModule proxy_balancer_module modules/mod_proxy_balancer.so
b. Append the following configuration details:
Proxy balancer://onedatacluster stickysession=JSESSIONIDBalancerMember ajp://Apache http server IP:AJP-Port1 min=10 max=100 route=node1 loadfactor=1 BalancerMember ajp://Apache http server IP:AJP-Port2 min=20 max=200 route=node2 loadfactor=1/ProxyProxyPass /onedata balancer://onedatacluster/onedataLocation /balancer-managerSetHandler balancer-manager/Location
7. At the command prompt, type httpd.exe to start Apache in a DOS box.
8. Type httpd.exe -k install to install Apache as a service.

Copyright © 2011-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release