Siebel REST API Guide > Getting Started with the Siebel REST API >

Configuring the worker.properties File for Load Balancing


A load balancer acts as a reverse proxy and distributes network or application traffic across a list of available of servers. A load balancer works as a middleman between the client and the servers by accepting requests from clients and distributing the requests to the backend servers based on the configured parameters.

The Apache HTTPD mod_jk Web server module is used to load balance Apache Tomcat servers. The load balancer.mod_jk is the connector used to connect Apache Tomcat with Web servers using an AJP connector.

This topic describes the initial configuration of the workers.properties file for load balancing. For more information about planning and managing load balancing for your deployment, see Siebel Installation Guide for the operating system you are using, Siebel Deployment Planning Guide, and Siebel System Administration Guide.

For more information about third-party load balancing options, see the Certifications tab on My Oracle Support.

Oracle recommends for optimal usage of Siebel User Session Connections maintained on Apache Tomcat.

To configure load balancing

  1. Download and install the version of Apache HTTPd Server you want to install from the following location:

    http://tomcat.apache.org/

    For detailed information about installing the HTTPd Server, see Apache Tomcat documentation.

  2. To configure the listen port, go to <HTTPDRootDir\> folder and do the following:
    1. Using any text editor, open the httpd.conf file on the Web server.
    2. Locate the Listen section and add the HTTP port number:

      Listen <port>

    3. Save the httpd.conf file.
    4. Start the Web server by executing the httpd.exe file.
    5. To check if the Web server is running, open a Web browser and enter the following url:

      http://hostip:<port>

  3. Download the Apache mod_jk module from the following location:

    http://httpd.apache.org/download.cgi

  4. Save the mod_jk.so file then place it in the <HTTPDRootDir\> modules directory folder.
  5. Create the following properties and log files:
    1. Create the workers.properties file then place it in the <HTTPDRootDir\> directory folder.
    2. Create the mod_jk.log file then place it in the <HTTPDRootDir\> directory folder.
  6. Modify the apache httpd.conf file as follows:
    1. Add a Load statement to load the mod_jk.so file as follows:

    # Load the mod_jk module
    LoadModule jk_module modules/mod_jk.so

    1. Add an if statement to define the commands to be executed once the module is loaded as follows:

    #Declare the module for use with the <IfModule directive> element.

    <IfModule jk_module>
      JkWorkersFile conf/workers.properties
      JkLogFile logs/mod_jk.log
      JkLogStampFormat "[%b %d %Y - %H:%M:%S] "
      JkRequestLogFormat "%w %V %T"
      JkLogLevel trace
      JkMount /* loadbalancer
      JkMount /Jkmanager status
    </IfModule>

    1. Save and close the httpd.conf file.
  7. Define the list of Tomcat workers that can accept requests by adding the following configuration to the workers.properties file:

    # Define workers
    worker.list=loadbalancer,status

    # Set properties for worker1
    worker.javacontainer1.type=ajp13
    worker.javacontainer1.host=<hostip>
    worker.javacontainer1.port=<ajportnumber>
    worker.javacontainer1.lbfactor=1
    worker.javacontainer 1.socket_keepalive=1
    worker.javacontainer1.socket_timeout=300

    # Set properties for worker2
    worker.javacontainer2.type=ajp13
    worker.javacontainer2.host=<hostip>
    worker.javacontainer2.port=<ajportnumber>
    worker.javacontainer2.lbfactor=1
    worker.javacontainer2.socket_keepalive=1
    worker.javacontainer2.socket_timeout=300

    # Set properties for loadbalancer
    worker.loadbalancer.type=lb
    worker.loadbalancer.balance_workers= javacontainer1, javacontainer2

    # Get statistics
    worker.status.type=status

    NOTE:  For the worker.<workername> property, both Apache Tomcat workers must have a unique name. For each node, the workername must be same as the JVMRoute name defined in the Apache Tomcat server.xml file. For example, if tomcat 1 has javacontainer1 set as the value for the JVMRoute name in the Apache Tomcat server.xml file for tomcat1, then the worker.properties parameter must have a worker.javacontainer1 value.

  8. Test the server by submitting the following REST API request:

    http://hostip:<port>/siebel/v1.0/data/Account/Account/88-431RF

Siebel REST API Guide Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.