2.2. Configuring Worker Nodes in mod_jk
2.2.1. Configuring Worker Nodes in mod_jk
Configure two mod_jk Worker node definitions in a weighted round robin configuration with sticky sessions active between two servlet containers.
Procedure 2.2. Configure mod_jk Worker Nodes
As a prerequisite, understand the format of the
workers.properties
directives, as specified in Section A.1, “workers.properties” and configure mod_jk (see Section 2.1, “Configure Load Balancing Using Apache and mod_jk”).
To configure mod_jk worker nodes:
- Navigate to
HTTPD_DIST/conf/
. - Create a file named
workers.properties
. - Append the following information into the
workers.properties
file.# Define list of workers that will be used # for mapping requests worker.list=loadbalancer,status # Define Node1 # modify the host as your host IP or DNS name. worker.node1.port=8009 worker.node1.host=node1.mydomain.com worker.node1.type=ajp13 worker.node1.ping_mode=A worker.node1.lbfactor=1 # Define Node2 # modify the host as your host IP or DNS name. worker.node2.port=8009 worker.node2.host=node2.mydomain.com worker.node2.type=ajp13 worker.node2.ping_mode=A worker.node2.lbfactor=1 # Load-balancing behavior worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=node1,node2 worker.loadbalancer.sticky_session=1 # Status worker for managing load balancer worker.status.type=status