How to enable clustering in Openfire Enterprise?

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 3.4.0 or later. 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. If you don't have an enterprise license and would like to try the clustering feature you can get an evaluation license for 30 days.


Follow these steps to install Openfire Enterprise with clustering:

1. Identify the machines where you are going to install the server. 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

http://www.igniterealtime.org/downloads/

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

http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/install-guide.html

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

5. Download the Openfire Enterprise plugin from here

http://www.igniterealtime.org/projects/openfire/plugins.jsp

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. Go to the Enterprise tab to enter a valid license for Openfire Enterprise.

At this point you have several machines running Openfire Enterprise. 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?

You may want to use a load balancer to distribute load between active servers. The load balancer does not need to support sticky sessions since XMPP connections are longed lived.

Comments

  1. You got a lot of informative post here about Linux.

    I'm into IT infrastructure. A little brief info. on OpenFire would be a good help (anyway i'll just Google it).

    Please continue sharing your knowledge. Don't stop blogging.

    I suggest you make it not much technical.

    Thanks!
    -
    Teknolohitura
    http://teknolohitura.url.ph

    ReplyDelete

Post a Comment

Popular posts from this blog

Scraping an Entire Website using LINUX

Google Sitemap Generator Installation in a CentOS Platform