Two Openfire servers with same domain over WAN

Hi, after testing different solutions, I come here to ask if you can help me with the better way to resolve this.

I have to set up two Openfire servers on a high-availability, fault tolerant scheme, but the primary objective is closeness to the user. The idea is to have servers on different regions, each one serving the closer users, but allowing the users to communicate between them using the same domain.

I’ve checked the server 2 server solution, but it requires two different domain to work. I’ve also checked Hazelcast plugin to form a cluster, but this solution seems to be designed to use servers on the same location, and needs to share one MySQL database. I’ve checked the solution Hazelcast over WAN , but doesn’t seems the better solution for what I’m searching. I thought about setting up Hazelcast with MySQL multi-master replication, but I don’t know if this will work.

What do you recommend? Maybe is there a plugin that I’m missing?

The recommended approach for this type of configuration is to use separate subdomains in each region, federated using Openfire server-to-server (S2S) connections. Within each region (LAN-based) you can then use clustering to meet your availability and scaling requirements. Note that each cluster (subdomain) will need to have its own database instance, and all the members of the cluster will share this instance. Database HA (via replication, multi-mastering, etc.) is not directly managed by Openfire or the Hazelcast plugin, but can be deployed independently as needed.

Note that if you would like to configure Hazelcast using a WAN-based deployment (as a single XMPP domain), I believe you will need to procure an enterprise license from Hazelcast.

1 Like

Thank you very much for your answer. This is what I thought, but I hoped to have another solution =)

It’s a shame that Openfire doesn’t support a distributed domain like this.