Skip to main content

Quic Timestamps For Measuring One-Way Delays
draft-huitema-quic-ts-00

The information below is for an old version of the document.
Document Type
This is an older version of an Internet-Draft whose latest revision state is "Expired".
Author Christian Huitema
Last updated 2020-02-24
RFC stream (None)
Formats
Additional resources
Stream Stream state (No stream defined)
Consensus boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date (None)
Responsible AD (None)
Send notices to (None)
draft-huitema-quic-ts-00
Network Working Group                                         C. Huitema
Internet-Draft                                      Private Octopus Inc.
Intended status: Experimental                          February 24, 2020
Expires: August 27, 2020

              Quic Timestamps For Measuring One-Way Delays
                        draft-huitema-quic-ts-00

Abstract

   The TimeStamp frame can be added to Quic packets when one way delay
   measurements is useful.  The timestamp is set to the number of
   microseconds from the beginning of the connection to the time at
   which the packet is sent.  The draft defines the "enable_time_stamp"
   transport parameter for negotiating the use of this extension frame,
   and a new frame types for the time_stamped frame.

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 August 27, 2020.

Copyright Notice

   Copyright (c) 2020 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

Huitema                  Expires August 27, 2020                [Page 1]
Internet-Draft                   QUIC-TS                   February 2020

   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Measuring One-Way Delays  . . . . . . . . . . . . . . . . . .   2
     1.1.  Terms and Definitions . . . . . . . . . . . . . . . . . .   3
   2.  Specification . . . . . . . . . . . . . . . . . . . . . . . .   3
     2.1.  Negotiation . . . . . . . . . . . . . . . . . . . . . . .   3
   3.  Time Stamp frame format . . . . . . . . . . . . . . . . . . .   3
     3.1.  RTT Measurements  . . . . . . . . . . . . . . . . . . . .   4
     3.2.  One-Way Delay Measurements  . . . . . . . . . . . . . . .   4
   4.  Discussion  . . . . . . . . . . . . . . . . . . . . . . . . .   5
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .   5
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   5
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   6
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .   6
     7.2.  Informative References  . . . . . . . . . . . . . . . . .   6
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   6

1.  Measuring One-Way Delays

   The QUIC Transport Protocol [I-D.ietf-quic-transport] provides a
   secure, multiplexed connection for transmitting reliable streams of
   application data.  The algorithms for QUIC Loss Detection and
   Congestion Control [I-D.ietf-quic-recovery] use measurement of Round
   Trip Time (RTT) to determine when packets should be retransmitted.
   RTT measurements are useful, but there are however many cases in
   which more precise One-Way Delay (1WD) measurements enable more
   efficient Loss Detection and Congestion Control.

   An example would be the Low Extra Delay Background Transport (LEDBAT)
   [RFC6817] which uses variations in transmission delay to detect
   competition for transmission resource.  Experience shows that while
   LEDBAT may be implemented using RTT measurements, it is somewhat
   inefficient because it will cause unnecessary slowdowns in case of
   queues or delayed ACKs on the return path.  Using 1WD solves these
   issues.  Similar argument can be made for most delay-based
   algorithms.

   We propose to enable one way delay measurements in QUIC by defining a
   time_stamp frame carrying the time at which a packet is sent.  The
   use of this extension frame is negotiated with a transport parameter,
   "enable_time_stamp".  When the extension is negotiated by both
   parties, this frame can be used in conjunction with other such as ACK
   to measure one way delays.

Huitema                  Expires August 27, 2020                [Page 2]
Internet-Draft                   QUIC-TS                   February 2020

1.1.  Terms and Definitions

   The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in BCP
   14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

2.  Specification

   The enable_time_stamp transport parameter used for negotiating the
   use of the extension frame is defined in Section 2.1.  The time_stamp
   frame format is defined in Section 3.

2.1.  Negotiation

   The use of the time_stamp frame extension is negotiated using a
   transport parameter:

   o  enable_time_stamp (TBD)

   The enable time stamp transport parameter is included if the endpoint
   accepts and sends time_stamp frames for this connection.  This
   parameter has a zero-length value.  Negotiation is successful if both
   peers support include this parameter in their transport parameter
   message.  Peers that receive a time_stamp frame in the absence of
   successful negotiation MAY terminate the connection with a PROTOCOL
   VIOLATION error.

   If negotiation is successful the peers SHOULD add a time_stamp frame
   to packets carrying an ACK frame.

3.  Time Stamp frame format

   Timestamped ACK are identified by the frame type:

   o  time_stamp (TBD)

   Time stamp frames carry a single parameter, the time stamp.

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          Time Stamp (i)                     ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                Figure 1: ACK Frame Format with Time Stamp

Huitema                  Expires August 27, 2020                [Page 3]
Internet-Draft                   QUIC-TS                   February 2020

   The time stamp encodes the number of microseconds since the beginning
   of the connection, as measured by the peer at the time at which the
   packet is sent.  It is encoded using the exponent selected by the
   peer in the ack_delay_exponent.  The exponent reduced time stamp is
   encoded as a variable length integer.

3.1.  RTT Measurements

   RTT measurements are performed as specified in Section 4 of
   [I-D.ietf-quic-recovery], without reference to the Timestamp
   parameter of the Timestamped ACK frames.

3.2.  One-Way Delay Measurements

   An endpoint generates a One Way Delay Sample on receiving a packet
   containing both a Time Stamp frame and an ACK frame that meets the
   following two conditions:

   o  the largest acknowledged packet number is newly acknowledged, and

   o  at least one of the newly acknowledged packets was ack-eliciting.

   The One Way Delay sample, latest_1wd, is generated as the time
   elapsed since the largest acknowledged packet was sent, corrected for
   the difference between local time at the sending peer and connection
   time at the receiving peer, phase_shift.

   latest_1wd = time_stamp - send_time_of_largest_acked - phase_shift

   By convention, the phase_shift is estimated upon reception of the
   first RTT sample, first_rtt.  It is set to:

   phase_shift = time_stamp - send_time_of_largest_acked - latest_rtt/2

   In that formula, we assume that the local time are measured in
   microseconds since the beginning of the connection.

   We understand that clocks may drift over time, and that simply
   estimating a phase shift at the beginning of a connection may be too
   simplistic for long duration connections.  Implementations MAY adopt
   different strategies to reestimate the phase shift at appropriate
   intervals.  Specifying these strategies is beyond the scope of this
   document.

Huitema                  Expires August 27, 2020                [Page 4]
Internet-Draft                   QUIC-TS                   February 2020

4.  Discussion

   This document replaces an earlier proposal to modify the format of
   the ACK frame by including a time stamp inside the modified frame.
   The revised proposal encodes the time stamp independently of the ACK
   frame, which requires slightly more overhead to encode the type of
   the time stamp frame.

   Defining an independent frame allows for more flexibility.  This
   draft defines the combination of time stamp with ACK frames, but they
   could be combined with other frames as well.  For example, adding a
   time stamp to packets carrying a Path Response could allow measuring
   one way delays before deciding to migrate to a new path.

5.  Security Considerations

   The Timestamp value in the Time Stamp frame is asserted by the sender
   of the packet.  Adversarial peers could chose values of the time
   stamp designed to exercise side effects in congestion control
   algorithms or other algorithms relying on the one-way delays.  This
   can be mitigated by running plausibility checks on the received
   values.  For example, each peer can maintain statistics not just on
   the One Way Delays, but also on the differences between One Way
   Delays and RTT, and detect outlier values.  Peers can also compare
   the differences between timestamps in packets carrying
   acknowledgements and the differences between the sending times of
   corresponding packets, and detect anomalies if the delays between
   acknowledging packets appears shorter than the delays when sending
   them.

6.  IANA Considerations

   This document registers a new value in the QUIC Transport Parameter
   Registry:

   Value: TBD (using value 0x7157 in early deployments)

   Parameter Name: enable_time_stamp

   Specification: Indicates that the connection should use TimeStamped
   ACK frames

   This document also registers a new value in the QUIC Frame Type
   registry:

   Value: TBD (using value 757 in early deployments)

   Frame Name: Time Stamp

Huitema                  Expires August 27, 2020                [Page 5]
Internet-Draft                   QUIC-TS                   February 2020

   Specification: time stamp at the time packet was sent

7.  References

7.1.  Normative References

   [I-D.ietf-quic-recovery]
              Iyengar, J. and I. Swett, "QUIC Loss Detection and
              Congestion Control", draft-ietf-quic-recovery-26 (work in
              progress), February 2020.

   [I-D.ietf-quic-transport]
              Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed
              and Secure Transport", draft-ietf-quic-transport-27 (work
              in progress), February 2020.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

7.2.  Informative References

   [RFC6817]  Shalunov, S., Hazel, G., Iyengar, J., and M. Kuehlewind,
              "Low Extra Delay Background Transport (LEDBAT)", RFC 6817,
              DOI 10.17487/RFC6817, December 2012,
              <https://www.rfc-editor.org/info/rfc6817>.

Author's Address

   Christian Huitema
   Private Octopus Inc.
   427 Golfcourse Rd
   Friday Harbor  WA 98250
   U.S.A

   Email: huitema@huitema.net

Huitema                  Expires August 27, 2020                [Page 6]