Load balancing with JBoss

<< Click to Display Table of Contents >>

Navigation:  Bizagi Engine > Bizagi system administration > Bizagi server configuration > Bizagi Engine JEE platform configuration > Setting up the system architecture > Configuring a load balancer >

Load balancing with JBoss

applies_JEE

 

The following section illustrates an example where a load balancer is configured for the Bizagi server.

This example applies for the JEE edition in which we will use a clustered JBoss configuration through the load balance modules in Apache HTTP Server.

 

Therefore and before you move on, make sure you have already set up your JBoss cluster, as described at Clustered JBoss configuration.

 

Keep in mind that Bizagi supports hardware or software load balancers, and it is recommended the use of a hardware-based load balancer (e.g, F5).

For more information about the general overview, refer to Configuring a load balancer.

 

 

Example

To illustrate how to configure load balancing, in this section we will describe which changes are required when using Apache HTTP Server (and its load balancing modules).

Therefore, in this example we part from having Apache HTTP Server installed in a Web server.

 

For JBoss, you may download this server directly from Apache HTTP Server's official webpage, and choose to include the mod_cluster-1.2.0 module for Apache 2.2.x installations.

This version that works for JBoss is also made available here: http://mod-cluster.jboss.org/.

 

note_pin

For a Windows OS setup of Apache, download and use mod_cluster-1.2.0.Final-windows-x86-ssl.zip, as made available in Apache HTTP Server web site.

This installer provides the necessary modules as well as the Apache Server files.

 

The path in which Apache HTTP Server is installed, will be referred to as <APACHE_HOME> from this point on.

 

SettingBizagiInternet00_InstallingApache

 

 

Configure the load balancer to consider multiple nodes.

When having installed Apache, you may want to make sure you start up the configuration module, as found as:

<APACHE_HOME>\bin\installconf

 

In our example using Apache HTTP Server and JBoss, we specify which nodes make up the clustered configuration by editing Apache's configuration file <APACHE_HOME>\conf\httpd.conf

 

To do this, ensure you enable the necessary modules as described below.

 

Edit this file to explicitly enable these lines:

LoadModule slotmem_module        modules/mod_slotmem.so

LoadModule manager_module        modules/mod_manager.so

LoadModule proxy_cluster_module  modules/mod_proxy_cluster.so

LoadModule advertise_module      modules/mod_advertise.so

 

And make sure you include these definitions be used for load balancing capabilities:

<IfModule manager_module>

Listen [Balancer_Server]:[Balancer_Port]

ManagerBalancerName mycluster

 <VirtualHost [Master_Node]:[Master_Port]>

         <Location />

                 Order deny,allow

                 Deny from all

                 Allow from 127.0.0.1

                 Allow from [Node1]:[Port1]

                 Allow from [Node2]:[Port2]

         </Location>

 

         KeepAliveTimeout 300

         MaxKeepAliveRequests 0

         AdvertiseFrequency 5

         ServerAdvertise On

         AdvertiseGroup 224.0.1.105:23364

         AllowDisplay On

         EnableMCPMReceive

 

         <Location /mod_cluster_manager>

                 SetHandler mod_cluster-manager

                 Order deny,allow

                 Deny from all

                 Allow from 127.0.0.1

                 Allow from [Node1]:[Port1]

                 Allow from [Node2]:[Port2]

         </Location>

 

 </VirtualHost>

</IfModule>

For the above, consider:

[Balancer_Server]: The name of the local server which is in charge of load balancing.

[Balancer_Port]: The port number through which the Balancer server attends requests.

[Node1] : Name (or IP address) of the Server where the first node making up the cluster is found.

[Port1] : Port number under which the first node attends requests.

[Node2] : Name (or IP address) of the Server where the second node making up the cluster is found.

[Port2] : Port number under which the second node attends requests.

 

Notice that for each additional node your JBoss cluster has, you will need to include additional occurrences of:

Allow from [NodeN]:[PortN]

 

 

note_pin

Bizagi supports any load balancing algorithm, and the only requirement for the load balancer configuration is that sticky sessions are enabled.

 

Once you have finished editing this file, save the changes and close it.

 

note_pin

Make sure that your JBoss nodes reference the load balancer in its modcluster subsystem (for the HA profile).

For this, make sure that they have set under the domain.xml file the following:

<subsystem xmlns="urn:jboss:domain:modcluster:1.1">

<mod-cluster-config advertise-socket="modcluster" proxy-list="[Balancer_Server]:[Balancer_Port]" balancer="mycluster" connector="ajp">

    <dynamic-load-provider>

         <load-metric type="busyness"/>

    </dynamic-load-provider>

</mod-cluster-config>

</subsystem>

 

 

You may now start this service and review that your cluster nodes are displayed correctly by browsing into:

http://[Balancer_Server]:[Port]/mod_cluster-manager

 

LoadBalance_check