Clustering with server nodes on the same machine

  • (4.0)

The second variant of the standalone configuration comes into picture when your server nodes are located (all or some of them) on the same machine. This scenario applies generally when you are scaling up your architecture by adding more hardware resources to your system.

Configuring server nodes on the same machine obviously requires duplicating your AS7 distribution on your filesystem. Then, in order to avoid a port conflict between server distributions, you have to choose between two options:

1. Defining multiple IP address on the same machine.
2. Defining a port offset for each server distribution.

This is also known as multihoming and requires some O/S tweaks to get working. Obviously, each operating system uses different approaches to achieve it, which may also vary depending on its version. Being out of the scope of this book to illustrate all possible ways to configure multihoming, we will just show two common scenarios.

Learn how to use JBOSS, from beginner basics to advanced techniques, with online video tutorials taught by industry experts. Enroll for Free JBOSS Training Demo!

When using a Linux box, just issue an ifconfig command to activate each IP address:

# ifconfig eth0 up
# ifconfig eth1 up

When using a Windows machine, you have to reach, from the network configuration panel, to your Ethernet card’s TCP-IP properties. Once there, click on the Advanced button and add all addresses that will be part of the cluster:

Once you have set up your network interface correctly, it’s time to update your standalone-ha.xml file. Follow the same steps exposed for multiple host cluster (for each server distribution, reach to the interfaces section, and within the nested interface element insert the IP address of the standalone server).

In the end, the first server distribution will be bound to the IP Address and the second one to (as an alternative, use the –b and –bmanagement switches exposed in the earlier section). The following diagram depicts this scenario:

Configuring multihoming is not always a viable choice because it requires some degree of administration experience or maybe because you are lacking in permissions on your machine, in which case, you could still set up a clustering configuration by defining a port offset for your each cluster member.

Frequently asked Jboss Interview Questions

By defining a port offset for each server, the entire default server binding interfaces will shift to a fixed amount, and hence you will not have two servers engaging the same IP address and the same port.

When using this configuration, you can bind each server network address to the same IP address. So, for all your server distributions, we will configure the standalone-

Explore Jboss Sample Resumes! Download & Edit, Get Noticed by Top Employers!Download Now!


Popular Courses in 2018

Get Updates on Tech posts, Interview & Certification questions and training schedules