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:
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.
Download Openfire from here
Run the installer to install Openfire in each of the machines. Follow the installation guide for more help.
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.
Download the Openfire Enterprise plugin from here
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
We now need to enter a valid license for Openfire Enterprise.
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:
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. <br/><br/>
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?.