Clarified the text in several places.
Establishing an XMPP session requires a fairly large number of round trips between the initiating entity and the receiving entity. In many deployment scenarios, it would be helpful to reduce the number of round trips and therefore the time needed to establish a session. This document defines protocols and best practices to do just that.
+Establishing an XMPP session can require a fairly large number of round trips between the initiating entity and the receiving entity. However, in many deployment scenarios it would be helpful to reduce the number of round trips and therefore the time needed to establish a session. This document describes protocol optimizations and best practices to do just that.
The primary method of speeding the connection process is pipelining of requests, as in &rfc2920; and the QUICKSTART extension proposed for SMTP (&smtpquickstart;). The application of similar principles to XMPP was originally suggested by Tony Finch in February 2008 <http://mail.jabber.org/pipermail/standards/2008-February/017966.html>.
+The primary method of speeding the connection process is pipelining of requests, along the lines of &rfc2920; and the QUICKSTART extension proposed for SMTP (&smtpquickstart;). The application of similar principles to XMPP was originally suggested by Tony Finch in February 2008 in a message to the standards@xmpp.org discussion list <http://mail.jabber.org/pipermail/standards/2008-February/017966.html>.
In essence, pipelining relies on two assumptions:
Together, these assumptions enable the parties to reduce the number of round trips needed to complete the stream negotiation process.
+Together, these assumptions enable the parties to reduce the number of round trips needed to complete the stream negotiation process by "pipelining" XMPP-related commands over the stream.
Note well that pipelining at the XMPP layer is not to be confused with HTTP pipelining, which was added to HTTP in version 1.1 and which is not encouraged when using the HTTP bindings for XMPP.
Without pipelining, the foregoing exchange would require 3 round trips; with pipelining it requires 1 round trip.
-Now the parties complete the TLS negotiation; for our purposes we don't count these round trips because they are the same no matter whether we use pipelining or not (i.e., some combination of the TLS messages specified in RFC 5246).
+Now the parties complete the TLS negotiation (i.e., some combination of the TLS messages specified in RFC 5246); for our purposes we don't count these round trips because they are the same no matter whether we use pipelining or not.
At the end of the TLS negotiation, the server knows that the client will need to restart the stream so it proactively attaches its response stream header and stream features in the same TCP packet at the TLS Finished message, thus starting the next exchange.
The pain of multiple round trips is magnified if the initiating entity needs to reconnect frequently (e.g., because of intermittent network outages). Although XEP-0124 can be used to mitigate the pain, BOSH is not appropriate for all scenarios and is not currently used in others (e.g., server-to-server streams).
-The minimize the speed of reconnection, implementations are strongly encouraged to support TLS Session Resumption (&rfc5077;) in addition to the technologies already mentioned.
-Reconnection can be further enhanced by using the stream resumption feature described in &xep0198;. XEP-0198 does not legislate exactly when it is safe for the server to allow the client to send the <resume/> request. Clearly, sending it before the stream is encrypted would increase the possibility of replay attacks. However, sending it after TLS negotiation (Step 4 above) but before SASL authentication and resource binding (Steps 5 through 8) would enable the client to begin sending stanzas more quickly. It is a matter of server policy whether to advertise the SM feature after TLS negotiation or only after SASL negotiation.
+To minimize the speed of reconnection, implementations are strongly encouraged to support TLS Session Resumption (&rfc5077;) in addition to the technologies already mentioned.
+Reconnection can be further enhanced by using the stream resumption feature defined in &xep0198;. XEP-0198 does not legislate exactly when it is safe for the server to allow the client to send the <resume/> request. Clearly, sending it before the stream is encrypted would increase the possibility of replay attacks. However, sending it after TLS negotiation (Step 4 above) but before SASL authentication and resource binding (Steps 5 through 8) would enable the client to begin sending stanzas more quickly. It is a matter of server policy whether to advertise the SM feature after TLS negotiation or only after SASL negotiation.
Because pipelining does not skip any channel encryption or authentication steps, but merely packs them into a smaller number of TCP packets or HTTP request/response pairs, it is unlikely that the foregoing quickstart methods introduce security vulnerabilities. However, the server must be careful not to send stream features that it would not otherwise send before a security context is established.
+Because pipelining does not skip any channel encryption or authentication steps, but merely packs them into a smaller number of TCP packets or HTTP request/response pairs, it is unlikely that the foregoing quickstart methods introduce security vulnerabilities. However, the server needs to be careful not to send stream features that it would not otherwise send before a security context is established.
This document requires no interaction with &IANA;.