Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 6 HTTP and SOAP Channels : Setting Up Fault Tolerance for the HTTP Channel

Setting Up Fault Tolerance for the HTTP Channel
Use the Apache HTTP server (“httpd”) and mod_jk to setup fault tolerance to the TIBCO BusinessEvents HTTP channel and a third party fronting server. These are used in addition to sharing the cache server between the nodes in the cluster.
Procedure
1.
2.
In Ajp_1.properties:
<channel path>.ajp.connector.port=8011
In Ajp_2.properties:
<channel path>.ajp.connector.port=8012
3.
4.
Configure the Apache HTTP server (“httpd”) as a fronting webserver. Add the worker.properties file in Apache httpd under the config folder. In the worker.properties file set the Apache httpd for load balancing. Configure two workers to listen to the above specified ajp ports. Disable one worker (for example, worker2) by default, so that no requests are sent to it. Now, configure another worker (that is, worker1), so that, in case of failure, it redirects all incoming requests to the disabled worker (that is, worker2). This worker, in case of failure, now becomes the active worker.
The worker.propeties file should contain the following properties:

 
worker.list=balancer
worker.balancer.type=lb
worker.balancer.sticky_session=0
worker.balancer.balance_workers=worker1,worker2
 
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8011
worker.worker1.redirect=worker2
 
worker.worker2.type=ajp13
worker.worker2.host=localhost
worker.worker2.port=8012
worker.worker2.activation=disabled

 
5.
Add Tomcat connectors mod_jk.so (you can download mod_jk from, if you don’t have one) under the modules folder.
You can download mod_jk from the following location:
http://tomcat.apache.org/download-connectors.cgi
6.

 
LoadModule jk_module modules/mod_jk.so
 
<IfModule jk_module>
JkWorkersFile conf/worker.properties
JkLogFile logs/mod_jk.log
JkLogStampFormat "[%b %d %Y - %H:%M:%S] "
JkRequestLogFormat "%w %V %T"
JkLogLevel info
 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
 
<Location //WEB-INF/>
deny from all
</Location>
 
JkMount /* balancer
</IfModule>

 
7.
8.
Open the browser/client and enter the url http://localhost/<context-path>, without any port.
The request is now routed to the active worker (worker1) only, since the other worker (worker2) is disabled. You can verify through logs that logs are being created only for one be-engine.
9.
To verify check the logs in the corresponding be-engine instance.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved