Number of Concurrent Connections

Normally only one connection to the remote server is required to send XMPP stanza to that server. In some cases however, under a high load, you can get much better throughput and performance if you open multiple connections to the remote server.

This is especially true when the remote server works in a cluster mode. Ideally you want to open a connection to each of the cluster nodes on the remote server. This way you can spread the traffic evenly among cluster nodes and improve the performance for s2s connections.

Tigase server offers 2 different parameters to tweak the number of concurrent, s2s connections:

  • 'max-out-total-conns' - the property specifies the maximum outgoing connections the Tigase server opens to any remote XMPP server. This is 'per domain' limit, which means that this limit applies to each of the remote domains Tigase connects to. If it is set to '4' then Tigase opens a maximum of 4 connections to 'jabber.org' plus maximum 4 connections to 'muc.jabber.org' even if this is the same physical server behind the same IP address.

    To adjust the limit you have to add following line to the init.properties file:

    s2s/max-out-total-conns[I]=2
  • 'max-out-per-ip-conns' - the property specifies the maximum outgoing connections Tigase server opens to any remote XMPP server to its single IP address. This too, is 'per domain' limit, which means that this limit applies to each of the remote domains Tigase connects to. If it is set to '1', and the above limit is set to '4', and the remote server is visible behind 1 IP address, then Tigase opens a maximum of 1 connection to 'jabber.org' plus a maximum of 1 connection to 'muc.jabber.org' and other subdomains.

    To adjust the limit you have to add following line to the init.properties file:

    s2s/max-out-per-ip-conns[I]=2