Fail-over using a backup Openfire server

Hi,

Is there any way to have a backup openfire server to handle fail-over without use of clustering plugin? Has anyone done this before, if so, can you please provide some directions?

I have seen a post from Gato http://www.igniterealtime.org/community/blogs/ignite/2008/04/24/openevenmorefire -351-released#comment-4127 which mentions that there will be a document available for this. Is it already available, if yes, where can I find that?

Thanks,

Parag

Oh, sounds nice, I’m interested in that, too

No suggestions?

Hi,

My setup is like what you describe, I think. Its basically a warm failover. You need to have some software layer handle the repointing of clients to your warm backup. For example, Linux IPVS can do it. You do need to setup some sort of manual migration of the database to the warm backup. This can be complex with quirks involved, for example, making sure that you have a database copy that has reference integreity.

But in general, most of your xmpp clients will need to reconnect when this happens due to the nature of the tcp port connection. Some of the more advanced clients may do this seemlessly behind the scenes.

daryl

Thanks Daryl for the reply.

We are trying to handle this as below -

Setup is -

  1. Openfire is installed on one m/c with say domain configured as xmpp_server1

  2. Backup openfire server is installed on another m/c with domain configured as **xmpp_server1_backup **

  3. Both openfire servers have their own databases but for users (authentication) we have setup a common database.

  4. We are using BOSH protocol to connect from client using JabberHTTPBindServlet configured on our jetty web-server.

We have added checks in JHB servlet to detect the failure of connection to main openfire server i.e. **xmpp-server1. **If we find the connection is broken it informs client about failure and client will try to connect to backup server.

I am not sure whether this is good approach or not (will post findings/issues later)

Also as you mentioned for database “This can be complex with quirks involved, for example, making sure that you have a database copy that has reference integreity.”, so does database maintains any live session data? Do we need to have same database for both openfire servers?

Thanks,

Parag

Hi Parag,

Looks like you are doing cool stuff and on the right track!

The database will store some of your openfre configuration settings, chatroom settings, and probably the most important for you, the user’s rosters. You will want to sync this information to your backup server, if that information is necessary for your environment.

You don’t absolutely need the same database on both servers, but it would probably be a good idea

My comment was more in reference to how some users will do a filesystem copy of their database to their backup system or for backup purposes. You have to be careful with this approach, since the ondisk format of the database can change in mid filesystem copy.

daryl