From 0394bbc21d4c3b01ee37617c2baad607e944239d Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Thu, 2 Jul 2009 15:59:00 +0000 Subject: [PATCH] multiplexing details git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@3302 4b5297f7-1745-476d-ba37-a9c6900126ab --- xep-0220.xml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/xep-0220.xml b/xep-0220.xml index d06afcaf..dad188c3 100644 --- a/xep-0220.xml +++ b/xep-0220.xml @@ -433,13 +433,23 @@ send: -

A single XML stream between Originating and Receiving Server can be used to multiplex stanzas for more than one domain pair. This usage is for historical reasons called "piggybacking". There are two variants of this:

-
    -
  • Origin Piggybacking, which employs different originating domains.
  • -
  • Destination Piggybacking, which employs different receiving domains.
  • -
-

The Originating Server SHOULD NOT use Destination Piggybacking unless the Receiving Server has signalled support for dialback error handling via <stream:features/>. The Originating Server MAY then attempt to multiplex a domain 'B' on the stream to the Receiving Server that is already used for domain 'A' if the hostname and port resolution results in the same IP address and port combination.

-

The Originating Server MAY use Origin Piggybacking even if the Receiving Server has not signalled support for graceful dialback error handling.

+

A single XML stream between Originating and Receiving Server can be used to multiplex stanzas for more than one domain pair. This usage is for historical reasons called "PIGGYBACKING". One common motivation for this is virtual hosting, for which many domains are hosted on the same server. Another common motivation for such reuse is the existence of additional services associated with the Sender Domain but hosted at subdomains thereof. For example, both the "target.tld" and the "sender.tld" XMPP servers might host a groupchat service at "chat.target.tld" and "chat.sender.tld" respectively. Without multiplexing, many server-to-server connections would be necessary to exchange stanzas between those domains. With more domains, the number of connections might exceed the maximum number of connections allowed from a single IP address as explained in &xep0205;. Multiplexing reduces the number of connections to two.

+

Note: Because dialback operates on domain pairs, a total of eight dialback negotiations is necessary for a bidirectional exchange of stanzas between two sending domains and two target domains.

+ +

In order to accept XML stanzas from rooms at "chat.sender.tld" intended for addresses at "target.tld", the "target.tld" domain will need to validate the "chat.sender.tld" domain (just as it already did for the "sender.tld" domain). Thus the Originating Server would now initiate a dialback negotiation with "target.tld" but specify the Sender Domain as "chat.sender.tld". Specifying different Sender Domains is called "SENDER PIGGYBACKING" and be MAY used without further negotation.

+
+ + +

Likewise, to send stanzas to rooms at "chat.target.tld" from addresses at "sender.tld", the Originating Server would initiate dialback negotiation with "chat.target.tld" on the same connection that may already be used to send stanzas from "sender.tld" to "target.tld", specifiying the Target Domain as "chat.target.tld". Specifiyng different target domains is called "TARGET PIGGYBACKING".

+

The Originating Server SHOULD NOT use Target Piggybacking unless the Receiving Server has signalled support for dialback error handling via <stream:features/>. The Originating Server MAY then attempt to multiplex a Sender Domain 'B' on the stream to the Receiving Server that is already used for Sender Domain 'A' if the hostname and port resolution results in the same IP address and port combination. For example:

+ + +

Because DNS lookups for both "target.tld" and "chat.target.tld" resolve to the same IP address (10.44.0.4) and port (5269), "sender.tld" may initiate a dialback negotation from "sender.tld" to "chat.target.tld" over the same XML stream that is already used to send stanzas from "sender.tld" to "target.tld".

+