Beruflich Dokumente
Kultur Dokumente
com
Originally published on
LinuxTechLab.com
In our earlier tutorial, we have learned to install wildfly 10.1.0. in this tutorial, we will
learn to create a load-balancing wildfly cluster. We will be using wildfly verison 10.1.0,
which is the latest wildfly version at the time of writing this tutorial. Wildfly supports
clustering out of the box & we need not install any special services/packages to get
wildfly cluster working.
Pre-requisite
We need to have wildfly 10.1.0 on our machine. If you dont have wildfly installed,
download the package from http://download.jboss.org/wildfly/10.1.0.Final/wildfly-
10.1.0.Final.zip.
(Recommended Read: Step by Step guide for Wildfly 10 (10.1.0) installation )
Configuration
Now lets start with the configuration part for the wildfly clustering. Open the folder with
the wildfly installed, in our case /data/wildfly-10.1.0.Final . We need to create a folder
with the name standalone2
$ cd /data/wildfly-10.1.0.Final
$ mkdir standalone2
Similarly, we will create another file by the name script2.sh & add the following line to
it,
$ vi script2.sh
#!/bin/sh
./standalone.sh -Djboss.server.base.dir=/data/wildfly-10.1.0.Final/standalone2
-Djboss.node.name=node1 -Djboss.socket.binding.port-offset=100
Similarly, we can create as many as instances necessary. To start the instances , run the
corresponding script i.e. script1.sh/script2.sh or both the scripts. We can now use our
mod_jk module enabled httpd server with load-balancing working in the background for
the wildfly instances.
If you think we have helped you or just want to support us, please consider these :-
Connect to us: Facebook | Twitter | Google Plus
LinuxTechLab.com