powered by Jive Software

How to enable clustering in Openfire Enterprise 3.4.0

What is clustering?

A cluster is when you have several servers hosting the same domain. Before Openfire 3.4.0 it was possible to only have one machine hosting a domain. Even though a single machine can scale to very big numbers (e.g. more than 100K concurrent users) there is still a limit in the number of users you can scale. Moreover, if that machine suffers a problem and the server stops then all users will be affected.

When using clustering you avoid those two problems. You will be naturally distributing the load among several machines thus even if one of them goes down the entire service will still continue to respond. The users that were connected to the machine that went down will just reconnect to any of the remaining machines.

How do I use clustering in Openfire?

Clustering is a commercial feature that is available in the Openfire Enterprise edition. That means that you need to get Openfire Enterprise to be able to use clustering. If you have an existing Openfire Enterprise license you will need to update it since the max number of members that could be part of the cluster is kept in the license. As part of the beta process we are providing a license that is good through October 31 that is when the beta process ends.

Follow these steps to install Openfire Enterprise 3.4.0 Beta:

  1. Identify the machines where you are going to install the beta. Any machine with at least 512MB of RAM is fine. Of course you need to have more than one machine to have a cluster running.

  2. Download Openfire from here

  3. Run the installer to install Openfire in each of the machines. Follow the installation guide for more help.

  4. Start the server and complete the setup wizard in each machine. Make sure to use an external database and that all servers are using the same database.

  5. Download the Openfire Enterprise plugin from here

  6. Log into the admin console and go to the Plugins page. Upload the enterprise.jar file from that page. Run this step for each machine

  7. We now need to enter a valid license for Openfire Enterprise.

  8. Go to the admin console and click on Enterprise. You should see the following page to paste the license.

  9. Now copy the following license content and paste it in the license information text area:

PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGxpY2Vuc2U+PGxpY2Vuc2VJRD4 x

ODg8L2xpY2Vuc2VJRD48cHJvZHVjdD5PcGVuZmlyZSBFbnRlcnByaXNlPC9wcm9kdWN0PjxsaWNlbnN l


Pjx2ZXJzaW9uPjMuNDwvdmVyc2lvbj48bnVtQ29waWVzPjE8L251bUNvcGllcz48bnVtQ2x1c3Rlck1 l







At this point we have several machines running Openfire 3.4.0 beta. The last step is to enable clustering and see how the machines meet each other. Follow these steps to enable clustering:

  1. Go to the clustering page in the admin console.

  2. Click on Enabled clustering and save the settings. It will take a few seconds for the first machine to start the cluster. Enabling cluster in the other machines will be faster. As each node joins the cluster you will see in the clustering page the nodes that conform the cluster.

What’s next?

At this point you have Openfire Enterprise running in a cluster. The next step is to run the test cases defined in the document How should I test clustering in Openfire Enterprise 3.4.0?.
cluster.xls (43520 Bytes)

Firewall Consideration

Source: Tongosol Wiki, modified for Openfire

If running a firewall on a machine you may have difficulties in forming a cluster consisting of multiple computers. This can be resolved by either:

  1. Disable the firewall, though this is generally not recommended.

  2. Grant full network access to the Openfire.

  3. Open up individual address and ports for Coherence - By default Coherence will use TCP and UDP ports starting at 8088, subsequent nodes on the same machine will use increasing port numbers. Coherence may also communicate over multicast, the default address and port will differ with based on the release. See unicast-listener and multicast-listener for details on address and port configuration.