Chapter 55. Server to Server Protocol Settings
Prev |  | Next

# Chapter 55. Server to Server Protocol Settings

Artur Hefczyc <artur.hefczyc@tigase.net> v2.0, June 2014: Reformatted for AsciiDoc. :toc: :numbered: :website: http://tigase.net :Date: 2010-06-29 21:27

The Tigase server 5.1.0 or later offers new, rewritten from scratch implementation for s2s communication which allows you to tweak it’s configuration to get a better performance in your installation.

S2S (or server to server) protocol is enabled by default with setting which are optimal for the most common cases. There is however a set of configuration parameters you can adjust the server behaviour to get an optimal performance for your installation.

This documents describes following elements of the Tigase server configuration:

1. Number of concurrent connections to external servers
2. The connection throughput parameters
3. Maximum waiting time for packets addressed to external servers and the connection inactivity time
4. Custom plugins selecting connection to the remote server

## 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.

The 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 domain the Tigase connects to. If it is set to '4' then Tigase opens maximum 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 the Tigase server opens to any remote XMPP server to its single IP address. This is 'per domain' limit, which means that this limit applies to each of the remote domain the Tigase connects to. If it is set to '1', above limit is set to '4' and the remote server is visible behind 1 IP address then Tigase opens maximum 1 connection to 'jabber.org' plus maximum 1 connection to 'muc.jabber.org', etc…​.

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

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

Prev |  | Next
Chapter 54. Configuration SASL EXTERNAL | Home | Connection Throughput