Does the server support clustering?

11 posts / 0 new
Last post
Does the server support clustering?

Yes the Tigase XMPP Server fully supports clustering for both HA and LB.


Hi Kolbit hope you are doing fine!
I want to ask you on whether there is a document on how to configure clustering between 2 instances of XMPP server running on 2 or more different machines.



Thank you I am fine.

Unfortunately there is no detailed document about clustering yet. configuration wizards describe how to generate configuration for simple case (session manager on one node and client/server connection manager on the other nodes).

Please have a look at --gen-config-sm and --gen-config-cs parameters.

If you have more complex needs or any problems please describe me your deployment installation and I will help you preparing server configuration for this.


Hi Again,
Mainly, i debuged most of the working code, and i am familiar with the overall interaction.
The only thing, which i couldn't debug, is the S2S. So, if i can have just a simple example of 2 servers interacting, i will figure it out and spare you the stupid question :).
By the way, Ever thought of making the server run on spring framework since now the project moved under GPLV3.


Ah, I am glad to see my code is not to messed to understand it ;-)

Anyway, regarding the s2s. I consider it to be the most complex part. This component is still not finished and should be rewritten in the future. But it works for now. The problem is that different XMPP servers behave differently and you have 2 connections to each server (DNS address), one for receiving and second for sending data. And the initial handshaking sends and receives packets on both connections. Usually you don't know the connection is from until you receive handshaking packet. in my opinion s2s-dialback protocol is a bit messy itself.

Therefore it might be very difficult to debug and conclusions you get from connections between 2 selected servers may not be true for connections between different servers.

So if you have any kind of stupid or wise questions please don't hesitate to ask. I am always happy to help.

Spring - I don't plan to use spring in Tigase server. Actually I am going to not use any third-party libraries in the future. Just JDK and my code. Tigase is supposed to be very lightweight application.


Since u have a running example of 2 tigase servers using s2s connection even if it's messy can u please send me the configuration of those files.
Many Thanks

There is nothing special about that configuration. This is just standard and default Tigase server configuration. The only difference is that each server has to run for different domain. This is it.

So actually to test 2 servers you need 2 separate machines with different IP addresses and different hostnames.

It is also possible to run this on a single machine but then you have to play a lot with network configuration on this machine. I mean you need to configure 2 IP addresses and 2 domain names for that machine. Sometimes it is a bit tricky but doable.


Hi Again
My question is how do u configure each server on a different machine to talk to the other.
i will provide 2 machines for this and i will install 2 tigase on those machines how can i configure each to talk to the know of the other presence.

Ok, let's say you have:

  1. 2 machines with addresses: test-a and test-b
  2. Your network is up and running and above addresses can be properly resolved using your DNS system.
  3. Hostname on both machines is set correctly so hostname command returns correct address on both.
  4. You don't have XML configuration files for the server on both machines.

Now you have to do:

  1. To generate configuration you have to run tigase server without any parameters so default configuration is generated.
  2. Register new account on each of the server using any Jabber/XMPP client of your choice. Let's say this is user-a@test-a and user-b@test-b.
  3. Connect Jabber/XMPP client(s) to both servers using just registered accounts.
  4. Try sending a message from one account to another. Try adding one user to the roster of the other user.
  5. Both server instances will connect automatically using s2s protocol.

As I said nothing special is needed to configure in the server to allow it to communicate with other servers via s2s protocol. This is just standard and default functionality. This is how all Jabber/XMPP servers on the Internet can talk to each other.

Please note proper network configuration is essential to have this working correctly.


very interesting post

but how would you go about only having one "server adress" in cluster mode.
for example two machines machine-a and machine-b but everyones registers under for example. Maybe the session manager can solve this issue.


I am sorry i talked a little to hastidly with a gen-config-cs or more and a gen-config-sm i could probably get what i was talking about.