Previous topic  Top  Next topic  Print this Topic

Load Balancing for Web Services


OntoBroker supports the AJP protocol to enable load balancing with the Apache HTTP Server 2.2.

1.Install Apache HTTP Server 2.2.
2.Edit <APACHE_HOME>/conf/httpd.conf
a)Enable mod_proxy, mod_proxy_ajp, and mod_proxy_balancer.

LoadModule proxy_module modules/

LoadModule proxy_ajp_module modules/

LoadModule proxy_balancer_module modules/

b)Set up your cluster.

ProxyPass / balancer://mycluster/


<Proxy balancer://mycluster>

BalancerMember ajp://localhost:9001 loadfactor=1

BalancerMember ajp://localhost:9002 loadfactor=1

# The below is sample how to add a hot standby

#BalancerMember ajp:// status=+H


For more details, see the ProxyPass Directive documentation at

3.Start OntoBroker instances:
a)Set the following parameters in the first instance of OntoConfig.prp:

WorkerName          = ob1

AJP.Port            = 9001

WebConsole          = on

AJP                 = on

Then start the OntoBroker.

b)Set the following parameters in OntoConfig.prp of the second instance:

WorkerName          = ob2

AJP.Port            = 9002

WebConsole          = on

AJP                 = on

Then start the OntoBroker.

NOTE: For a production server do not forget to secure the Apache server!

After Apache is started as a load balancer and the OntoBroker instances are also running as well, the webservice can be accessed via a WSDL pointing to the Apache port e.g.:

http://localhost/services/ontobroker?wsdl  (Apache on port 80)

instead of


(OntoBroker on port 9001, which will not work)

The webconsole is accessible via:


For more information on the web console click here.


Only stateless Web services are supported. As one negative example, the Semantic Guide Web service is not supported as it mainly consists of stateful operations. For the same reasons, the collaboration server and remote API are not available.