QUIC B. Trammell, Ed. Internet-Draft M. Kuehlewind Intended status: Experimental ETH Zurich Expires: October 12, 2018 April 10, 2018 The QUIC Latency Spin Bit draft-ietf-quic-spin-exp-latest Abstract This document specifies the addition of a latency spin bit to the QUIC transport protocol and describes how to use it to measure end- to-end latency. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on October 12, 2018. Copyright Notice Copyright (c) 2018 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Trammell & Kuehlewind Expires October 12, 2018 [Page 1] Internet-Draft QUIC Spin Bit April 2018 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. About This Document . . . . . . . . . . . . . . . . . . . 2 2. The Spin Bit Mechanism . . . . . . . . . . . . . . . . . . . 3 2.1. Proposed Short Header Format Including Spin Bit . . . . . 3 2.2. Setting the Spin Bit on Outgoing Packets . . . . . . . . 3 2.3. Resetting Spin Value State . . . . . . . . . . . . . . . 4 3. Using the Spin Bit for Passive RTT Measurement . . . . . . . 4 4. Scope of the Experiment . . . . . . . . . . . . . . . . . . . 5 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 6. Security and Privacy Considerations . . . . . . . . . . . . . 5 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 6 8. Informative References . . . . . . . . . . . . . . . . . . . 6 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7 1. Introduction The QUIC transport protocol [QUIC-TRANS] uses Transport Layer Security (TLS) [TLS] to encrypt most of its protocol internals. In contrast to TCP where the sequence and acknowledgement numbers and timestamps (if the respective option is in use) can be seen by on- path observers and used to estimate end-to-end latency, QUIC's wire image (see [WIRE-IMAGE]) currently does not expose any information that can be used for passive latency measurement techniques that rely on this information (e.g. [CACM-TCP], [TMA-QOF]). This document adds an explicit signal for passive latency measurability to the QUIC short header: a "spin bit". Passive observation of the spin bit provides one RTT sample per RTT to passive observers of QUIC traffic. This document describes the mechanism, how it can be added to QUIC, and how it can be used by passive measurement facilities to generate RTT samples. 1.1. About This Document This document is maintained in the GitHub repository https://github.com/britram/draft-trammell-quic-spin, and the editor's copy is available online at https://britram.github.io/draft-trammell- quic-spin. Current open issues on the document can be seen at https://github.com/britram/draft-trammell-quic-spin/issues. Comments and suggestions on this document can be made by filing an issue there, or by contacting the editor. Trammell & Kuehlewind Expires October 12, 2018 [Page 2] Internet-Draft QUIC Spin Bit April 2018 2. The Spin Bit Mechanism The latency spin bit enables latency monitoring from observation points on the network path. Since it is possible to measure handshake RTT without a spin bit, it is sufficient to include the spin bit in the short packet header. The spin bit therefore appears only after version negotiation and connection establishment are completed. 2.1. Proposed Short Header Format Including Spin Bit As of the current editor's version of [QUIC-TRANS], this proposal specifies using the fifth most significant bit (0x08) of the first octet in the short header for the spin bit. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+ |0|K|1|1|0|S|T T| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Destination Connection ID (0..144) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Packet Number (8/16/32) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Protected Payload (*) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 1: Short Header Format including proposed Spin Bit S: The Spin bit is set 0 or 1 depending on the stored spin value that is updated on packet reception as explained in Section 2.2. 2.2. Setting the Spin Bit on Outgoing Packets Each endpoint, client and server, maintains a spin value, 0 or 1, for each QUIC connection, and sets the spin bit in the short header to the currently stored value when a packet with a short header is sent out. The spin value is initialized to 0 on both side, at the client as well as the server at connection start. Each endpoint also remembers the highest packet number seen from its peer on the connection. The spin value is then determined at each endpoint as follows: o When it receives a packet from the client, if that packet has a short header and if it increments the highest packet number seen by the server from the client, it sets the spin value to the value observed in the spin bit in the received packet. Trammell & Kuehlewind Expires October 12, 2018 [Page 3] Internet-Draft QUIC Spin Bit April 2018 o When it receives a packet from the server, if the packet has a short header and if it increments the highest packet number seen by the client from the server, it sets the spin value to the opposite of the spin bit in the received packet. This procedure will cause the spin bit to change value in each direction once per round trip. Observation points can estimate the network latency by observing these changes in the latency spin bit, as described in Section 3. See [SPIN-BIT] for further illustration of this mechanism in action. 2.3. Resetting Spin Value State Each client and server resets it spin value to zero when sending the first packet in a given with a new Connection ID. This reduces the risk that transient spin bit state can be used to link flows across connection migration or ID change. 3. Using the Spin Bit for Passive RTT Measurement When a QUIC flow sends data continuously, the latency spin bit in each direction changes value once per round-trip time (RTT). An on- path observer can observe the time difference between edges (changes from 1 to 0 or 0 to 1) in the spin bit signal in a single direction to measure one sample of end-to-end RTT. An observer can keep the largest observed packet number per flow, and reject edges that do not have a packet number that is larger than the last largest observed packet number. This will detect spurious edges caused by reordering across an edge, which would lead to low RTT estimates, if not ignored. The packet number can be used to filter out high RTT estimates due to loss of an actual edge in a burst of lost packets. If the spin bit edge occurs after a long packet number gap, it should be rejected. Note that this measurement, as with passive RTT measurement for TCP, includes any transport protocol delay (e.g., delayed sending of acknowledgements) and/or application layer delay (e.g., waiting for a request to complete). It therefore provides devices on path a good instantaneous estimate of the RTT as experienced by the application. A simple linear smoothing or moving minimum filter can be applied to the stream of RTT information to get a more stable estimate. However, application-limited and flow-control-limited senders can have application and transport layer delay, respectively, that are much greater than network RTT. When the sender is application- limited and e.g. only sends small amount of periodic application Trammell & Kuehlewind Expires October 12, 2018 [Page 4] Internet-Draft QUIC Spin Bit April 2018 traffic, where that period is longer than the RTT, measuring the spin bit provides information about the application period, not the network RTT. Simple heuristics based on the observed data rate per flow or changes in the RTT series can be used to reject bad RTT samples due to application or flow control limitation. An on-path observer that can see traffic in both directions (from client to server and from server to client) can also use the spin bit to measure "upstream" and "downstream" component RTT; i.e, the component of the end-to-end RTT attributable to the paths between the observer and the server and the observer and the client, respectively. It does this by measuring the delay between a spin edge observed in the upstream direction and that observed in the downstream direction, and vice versa. 4. Scope of the Experiment This document specifies an experimental delta to the QUIC transport protocol. Specifically, this experimentation is intended to determine: o the impact of the addition of the latency spin bit on implementation and specification complexity; and o the accuracy and value of the information derived from spin bit measurement on live network traffic. The information generated by this experiment will be used by the QUIC working group as input to a decision about the standardization of the latency spin bit. This document describes a one-bit latency spin signal. A three-bit latency spin signal, which provides reordering, loss, and edge delay resistance even without cleartext packet numbers in the QUIC header, is described in [QUIC-SPIN]; experimentation with this approach is also encouraged. 5. IANA Considerations This document has no actions for IANA. 6. Security and Privacy Considerations The spin bit is intended to expose end-to-end RTT to observers along the path, so the privacy considerations for the latency spin bit are essentially the same as those for passive RTT measurement in general. However, it has been shown that these kind of RTT estimates do not provide a sufficiently high enough accuracy for geo-locating, Trammell & Kuehlewind Expires October 12, 2018 [Page 5] Internet-Draft QUIC Spin Bit April 2018 therefore the privacy risk of exposing these information is considered low. 7. Acknowledgments This document is derived from [QUIC-SPIN], which was the work of the following authors in addition to the editor of this document: o Piet De Vaere, ETH Zurich o Roni Even, Huawei o Giuseppe Fioccola, Telecom Italia o Thomas Fossati, Nokia o Marcus Ihlar, Ericsson o Al Morton, AT&T Labs o Emile Stephan, Orange The QUIC Spin Bit was originally specified in a slightly different form by Christian Huitema. This work is partially supported by the European Commission under Horizon 2020 grant agreement no. 688421 Measurement and Architecture for a Middleboxed Internet (MAMI), and by the Swiss State Secretariat for Education, Research, and Innovation under contract no. 15.0268. This support does not imply endorsement. 8. Informative References [CACM-TCP] Strowes, S., "Passively Measuring TCP Round-Trip Times (in Communications of the ACM)", October 2013. [QUIC-SPIN] Trammell, B., Vaere, P., Even, R., Fioccola, G., Fossati, T., Ihlar, M., Morton, A., and S. Emile, "The Addition of a Spin Bit to the QUIC Transport Protocol", draft- trammell-quic-spin-01 (work in progress), December 2017. [QUIC-TRANS] Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed and Secure Transport", draft-ietf-quic-transport-10 (work in progress), March 2018. Trammell & Kuehlewind Expires October 12, 2018 [Page 6] Internet-Draft QUIC Spin Bit April 2018 [SPIN-BIT] Trammell, B., Vaere, P., Even, R., Fioccola, G., Fossati, T., Ihlar, M., Morton, A., and S. Emile, "The Addition of a Spin Bit to the QUIC Transport Protocol", draft- trammell-quic-spin-01 (work in progress), December 2017. [TLS] Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", draft-ietf-tls-tls13-28 (work in progress), March 2018. [TMA-QOF] Trammell, B., Gugelmann, D., and N. Brownlee, "Inline Data Integrity Signals for Passive Measurement (in Proc. TMA 2014)", April 2014. [WIRE-IMAGE] Trammell, B. and M. Kuehlewind, "The Wire Image of a Network Protocol", draft-trammell-wire-image-03 (work in progress), April 2018. Authors' Addresses Brian Trammell (editor) ETH Zurich Email: ietf@trammell.ch Mirja Kuehlewind ETH Zurich Email: mirja.kuehlewind@tik.ee.ethz.ch Trammell & Kuehlewind Expires October 12, 2018 [Page 7]