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
- 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.
- To configure the listen port, go to <HTTPDRootDir\> folder and do the following:
- Using any text editor, open the httpd.conf file on the Web server.
- Locate the Listen section and add the HTTP port number:
Listen <port>
- Save the httpd.conf file.
- Start the Web server by executing the httpd.exe file.
- To check if the Web server is running, open a Web browser and enter the following url:
http://hostip:<port>
- Download the Apache mod_jk module from the following location:
http://httpd.apache.org/download.cgi
- Save the mod_jk.so file then place it in the <HTTPDRootDir\> modules directory folder.
- Create the following properties and log files:
- Create the workers.properties file then place it in the <HTTPDRootDir\> directory folder.
- Create the mod_jk.log file then place it in the <HTTPDRootDir\> directory folder.
- Modify the apache httpd.conf file as follows:
- 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
- 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>
- Save and close the httpd.conf file.
- 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.
- Test the server by submitting the following REST API request:
http://hostip:<port>/siebel/v1.0/data/Account/Account/88-431RF
|