1
votes

In RFC 3920 (XMPP core), it define there must be one TCP connection for each direction for server-to-server communication, but for client-to-server it doesn't force it. So any reason or benefit to force two TCP connections for server-to-server?

In the context of client-to-server communications, a server MUST allow a client to share a single TCP connection for XML stanzas sent from client to server and from server to client. In the context of server-to-server communications, a server MUST use one TCP connection for XML stanzas sent from the server to the peer and another TCP connection (initiated by the peer) for stanzas from the peer to the server, for a total of two TCP connections.

1

1 Answers

2
votes

Your reference is outdated. RFC 3920 has been replaced by RFC 6120. The new RFC removes the requirement for 2 TCP connection between server.

Historically, those two s2s connections are needed because of s2s dialback. Dialback is DNS based authentication of the third party server. If you do TLS cert based authentication for your s2s connections, you can rely on a single connection.

Reference: http://xmpp.org/rfcs/rfc6120.html#tcp