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:
  1. Navigate to HTTPD_DIST/conf/.
  2. Create a file named workers.properties.
  3. 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
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.