< Previous | Front page | Next >
Skip to end of metadata
Go to start of metadata

In this article, I would like to document how to set up a load balanced high availability standalone cluster.

For domain cluster refer to WildFly 8 Clustering Howto

Preparation and Scenario

We need to prepare two hosts for this. We will assume that the following conditions are satisfied

  • Two Nodes with *Nix installed
  • Make sure that they are in same local network
  • Make sure that they can access each other via different TCP/UDP ports(better turn off firewall and disable SELinux during the experiment or they will cause network problems).


  • We are going to install 2 standalone instances of WildFly - Let's call them Server One and Server Two
  • Both servers execute the full-ha profile
  • Apache httpd will be run on Server One and in httpd we will enable the mod_cluster module. The WildFly 8 on both the servers will form a cluster and discovered by httpd.

Download WildFly 8

First we should download WildFly 8 from the website:

Next untar the downloaded zip

The above command will untar the package in to the wildfly directory

On changing to the wildfly directory and listing the directory structure, you should see the below structure

Starting Wildfly in Cluster Configuration

Starting the wildfly instance can be done using the below command on Unix on both the servers

Here the -c option specifies the configuration file to use. We are going to use the High-Availability setup
The -u option describes the multicast address. It is using this IP both servers communicate.
For ease of setup, I have included the $HOSTNAME in the nodename and start up options

For windows User, replace the $HOSTNAME with %COMPUTERNAME%
Please note that you should be in wildfy/bin when you execute the above command

You should observer similar output

Installing & Configuring Apache Httpd

Download Apache httpd

Get the httpd from the JBoss downlode site:

This version is pre-configured with all set up necessary to run mod_cluster out of the box and connect with JBoss

If you already have HTTPD installed, then, please get the following archive and untar

The httpd and it's associated configuration assumes that the server will be installed in /opt/jboss/httpd.
If you do not follow this path structure, then the configurations do not work.

On *nix, you can use the ln command to create a symbolic link to /opt/jboss/httpd and configure as needed

Sample as listed below


The main configuration for the server would be under the

Ensure the Listen directive is setup appropriately.

At the end of the file ensure that the mod_cluster directive are appropriately setup

Save and exit.

Now, execute Apache via the following command

Verify by opening the url: http://<IP>:6666/mod_cluster_manager in your browser

You should see something similar to this:

wildfly wildfly Delete
mod_cluster mod_cluster Delete
standalone standalone Delete
getting_started getting_started Delete
cluster cluster Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.