<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY I-D.narten-iana-considerations-rfc2434bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.narten-iana-considerations-rfc2434bis.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="no"?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="exp" docName="draft-gomez-tcpm-ack-rate-request-01"
     ipr="trust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the 
         full title is longer than 39 characters -->

    <title abbrev="TCP ACK Rate Request Option">
    TCP ACK Rate Request Option
    </title>

 
    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->
 
    <author fullname="Carles Gomez" initials="C.G" surname="Gomez">
      <organization>UPC</organization>

      <address>
        <postal>
          <street>C/Esteve Terradas, 7</street>

          <city>Castelldefels</city>

          <region/>

          <code>08860</code>

          <country>Spain</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>carlesgo@entel.upc.edu</email>

        <uri/>
      </address>
    </author>

    <author fullname="Jon Crowcroft" initials="J.C" surname="Crowcroft">
      <organization>University of Cambridge</organization>

      <address>
        <postal>
          <street>JJ Thomson Avenue</street>

          <city>Cambridge</city>

          <region>CB3 0FD</region>

          <code/>

          <country>United Kingdom</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>jon.crowcroft@cl.cam.ac.uk</email>

        <uri/>
      </address>
    </author>

  
    <!-- uri and facsimile elements may also be added -->

    <date month="October" year="2020"/>

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill 
         in the current day for you. If only the current year is specified, xml2rfc will fill 
	 in the current day and month for you. If the year is not the current one, it is 
	 necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the 
	 purpose of calculating the expiry date).  With drafts it is normally sufficient to 
	 specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>APP</area>

    <workgroup>TCPM Working Group</workgroup>

    <!-- WG name at the upperleft corner of the doc,
         IETF is fine for individual submissions.  
	 If this element is not present, the default is "Network Working Group",
         which is used by the RFC Editor as a nod to the history of the IETF. -->

    <!---->

    <abstract>
      <t> TCP Delayed Acknowledgments (ACKs) is a widely deployed mechanism that allows 
          reducing protocol overhead in many scenarios. However, Delayed ACKs may also 
          contribute to suboptimal performance. When a relatively large congestion window (cwnd)
          can be used, less frequent ACKs may be desirable. On the other hand, in relatively 
          small cwnd scenarios, eliciting an immediate ACK may avoid unnecessary delays that 
          may be incurred by the Delayed ACKs mechanism. This document specifies the TCP ACK 
          Rate Request (TARR) option. This option allows a sender to indicate the ACK rate to
          be used by a receiver, and it also allows to request immediate ACKs from a receiver.
      </t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction ">

      <t>Delayed Acknowledgments (ACKs) were specified for TCP with the aim to reduce protocol
         overhead <xref target="RFC1122"/>. With Delayed ACKs, a TCP delays sending an ACK by
         up to 500 ms (often 200 ms, with lower values in recent implementations such as ~50 ms
         also reported), and typically sends an ACK for at least every second segment received 
         in a stream of full-sized segments. This allows combining several segments into a
         single one (e.g. the application layer response to an application layer data message,
         and the corresponding ACK), and also saves up to one of every two ACKs, under many 
         traffic patterns (e.g. bulk transfers). The "SHOULD" requirement level for implementing
         Delayed ACKs in RFC 1122, along with its expected benefits, has led to a widespread 
         deployment of this mechanism.
      </t>

      <t>However, there exist scenarios where Delayed ACKs contribute to suboptimal performance.
         We next roughly classify such scenarios into two main categories, in terms of the 
         congestion window (cwnd) size and the Maximum Segment Size (MSS) that would be used
         therein: i) "large" cwnd scenarios (i.e. cwnd >> MSS), and ii) "small" cwnd scenarios
         (e.g. cwnd up to ~MSS). 
      </t>
 
      <t>In "large" cwnd scenarios, increasing the number of data segments after which a 
         receiver transmits an ACK beyond the typical one (i.e. 2 when Delayed ACKs are used)
         may provide significant benefits. One example is mitigating performance limitations
         due to asymmetric path capacity (e.g. when the reverse path is significantly limited 
         in comparison to the forward path) <xref target="RFC3449"/>. Another advantage is reducing the 
         computational cost both at the sender and the receiver, and reducing network packet
         load, due to the lower number of ACKs involved.          
      </t>

      <t>In many "small" cwnd scenarios, a sender may want to request the receiver to 
         acknowledge a data segment immediately (i.e. without the additional delay incurred by
         the Delayed ACKs mechanism). In high bit rate environments (e.g. data centers), a 
         flow's fare share of the available Bandwidth Delay Product (BDP) may be in the order
         of one MSS, or even less. For an accordingly set cwnd value (e.g. cwnd up to MSS),
         Delayed ACKs would incur a delay that is several orders of magnitude greater than the
         RTT, severely degrading performance. Note that the Nagle algorithm may produce the 
         same effect for some traffic patterns in the same type of environments <xref target="RFC8490"/>.
         In addition, when transactional data exchanges are performed over TCP, or when the 
         cwnd size has been reduced, eliciting an immediate ACK from the receiver may avoid 
         idle times and allow timely continuation of data transmission and/or cwnd growth, 
         contributing to maintaining low latency. 
      </t>

      <t>Further "small" cwnd scenarios can be found in Internet of Things (IoT) environments.
         Many IoT devices exhibit significant memory constraints, such as only enough RAM for
         a send buffer size of 1 MSS. In that case, if the data segment does not elicit an 
         application-layer response, the Delayed ACKs mechanism unnecessarily contributes a 
         delay equal to the Delayed ACK timer to ACK transmission.  The sender cannot transmit
         a new data segment until the ACK corresponding to the previous data segment is received
         and processed.
      </t>

      <t>With the aim to provide a tool for performance improvement in both "large" and "small"
         cwnd scenarios, this document specifies the TCP ACK Rate request (TARR) option. 
         This option allows a sender to indicate the ACK rate to be used by a receiver, 
         and it also allows to request immediate ACKs from a receiver.</t>

    </section>
 
      <section title="Conventions used in this document">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL","SHALL NOT",
        "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
        document are to be interpreted as described in <xref
        target="RFC2119"/>.</t>
      </section>


  <section title="TCP ACK Rate Request Functionality">
   
      <t>A TCP endpoint announces that it supports the TARR option by including the TARR
         option format in packets that have the SYN bit set. In such packets, the values
         carried by the TARR option format other than Kind, Length and ExID MUST be ignored
         by the receiving TCP.
      </t>

      <t>TBD1: perhaps two formats (with one codepoint each), a shorter one just to
         advertise that TARR is supported, and a larger one which is the current TARR option 
         format defined in section 4?
      </t>

      <t>The next two subsections define the sender and receiver behaviors for devices
         that support the TARR option, respectively.</t>

       <section title="Sender behavior">

        <t>A TCP sender MUST NOT include the TARR option in TCP data segments to be
           sent if the TCP receiver does not support the TARR option.
        </t>

      	<t>A TCP sender MAY request a TARR-option-capable receiver to modify the ACK rate of the  
           latter to one ACK every R full-sized data segments received from the 
           sender. This request is performed by the sender by including the TARR 
           option in the TCP header of a data segment. The TARR option carries 
           the R value requested by the sender (see section 4). For the described 
           purpose, the value of R MUST NOT be zero. The TARR option also carries the N field, 
           which MUST be ignored when R is not set to zero.
      	</t>

      	<t>When a TCP sender needs a data segment to be acknowledged immediately 
           by a TARR-option-capable receiving TCP, the sender includes the TARR option in 
           the TCP header of the data segment, with a value of R equal to 
           zero. When R is set to zero, the N field of the same option indicates the 
           number of subsequent data segments for which the sender also requests immediate ACKs.
        </t>

      	<t>A TCP sender MAY indicate that it has a reordering tolerance of R packets by setting
           the Ignore Order field of the TARR option to True (see Section 4).
      	</t>

       </section>

       <section title="Receiver behavior">

      	<t>   A receiving TCP conforming to this specification MUST process a TARR 
              option present in a received data segment.
      	</t>

      	<t>When the TARR option of a received segment carries an R value different from zero,
           a TARR-option-capable receiving TCP MUST modify its ACK rate to one ACK every R
           full-sized received data segments from the sender, as long as packet reordering does not occur. 
           When R is different from zero, the receiving TCP MUST ignore the N field of the TARR option.
        </t>

      	<t>A TARR-option-capable TCP that receives a TARR option with the Ignore Order 
           field set to True (see Section 4), MUST NOT send an ACK after each reordered data 
           segment. Instead, it MUST continue to send one ACK every R received data segments.
           Otherwise (i.e., Ignore Order = False), such a receiver will need to send an ACK
           after each reordered data segment received. 
      	</t>

        <t>If a TARR-option-capable TCP receives a segment carrying the TARR option with R=0,
           the receiving TCP MUST send an ACK immediately, and it MUST also send an ACK 
           immediately after each one of the N next consecutive segments to be received. 
           N refers to the corresponding field in the TARR option of the received segment
           (see Section 4).
        </t>


       </section>

  </section>


  <section title="Option Format">
      <t> The TARR option has the format and content shown in Fig. 1.         
      </t>

      <t>
        <figure title="TCP ACK Rate Request option format."
                anchor="fig_TARR_format">
        <artwork><![CDATA[    
                                                  
      0          1          2          3
      01234567 89012345 67890123 45678901
     +--------+--------+--------+--------+
     |  Kind  | Length |       ExID      |
     +--------+--------+--------+--------+
     |   R    | IgnOrd |    N   |    
     +--------+--------+--------+

        ]]></artwork></figure>

      </t>
      
      <t>    Kind: The Kind field value is TBD.
      </t>

      <t>    Length: The Length field value is 7 bytes.
      </t>

      <t>    ExID: The experiment ID field size is 2 bytes, and its value is 0x00AC.
      </t>

      <t>    R: The size of this field is 1 byte. If all bits of this field are 
          set to 0, the field indicates a request by the sender for the 
          receiver to trigger one or more ACKs immediately. Otherwise, the field 
          carries the binary encoding of the number of full-sized 
          segments received after which the receiver is requested by the 
          sender to send an ACK.
      </t>

      <t>    Ignore Order: The size of this field is 1 byte. This field MUST have 
          the value 0x01 ("True") or 0x00 ("False"). When this field is set to True, 
          the receiver MUST NOT send an ACK after each reordered data segment. Instead,
          it MUST continue to send one ACK every R received data segments.
      </t>

      <t>    TBD2: perhaps 7 bits for R and 1 bit for Ignore Order?
      </t>

      <t>       N: The size of this field is 1 byte. When R=0, the N field 
      indicates the number of subsequent consecutive data segments to be 
      sent for which immediate ACKs are requested by the sender.  
      </t>

  </section>

  <section title="IANA Considerations">  
    <t>This document specifies a new TCP option (TCP ACK Rate Request) that 
       uses the shared experimental options format <xref target="RFC6994"/>, with ExID in 
       network-standard byte order.  
    </t>

    <t>The authors plan to request the allocation of ExID value 0x00AC for 
       the TCP option specified in this document.
    </t>
 
  </section>

    <section anchor="Security" title="Security Considerations">

      <t>TBD
      </t>
    
    </section>

    <!-- This PI places the pagebreak correctly (before the section title) in the text output. -->

    <!-- Possibly a 'Contributors' section ... -->
    
    <section anchor="ACKs" title="Acknowledgments">

      <t>Bob Briscoe, Jonathan Morton, Richard Scheffenegger, Neal Cardwell,
   Michael Tuexen, Yuchung Cheng, Matt Mathis, Jana Iyengar, Gorry
   Fairhurst, and Stuart Cheshire provided useful comments and input for this document.
   Jana Iyengar suggested including a field to allow a sender communicate its tolerance 
   to reordering. Gorry Fairhurst suggested adding a mechanism to request a number of 
   consecutive immediate ACKs.
      </t>     

      <t>Carles Gomez has been funded in part by the Spanish Government 
         through project PID2019-106808RA-I00, and by Secretaria
         d'Universitats i Recerca del Departament d'Empresa i Coneixement de
         la Generalitat de Catalunya 2017 through grant SGR 376.
      </t>


    </section>

   </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->


    <references title="Normative References">

      <?rfc include='reference.RFC.1122.xml'?>

      <?rfc include='reference.RFC.2119.xml'?>

      <?rfc include='reference.RFC.6994.xml'?>

    </references>

    <references title="Informative References">
      <!-- Here we use entities that we defined at the beginning. -->

      <?rfc include='reference.RFC.3449.xml'?>

      <?rfc include='reference.RFC.8490.xml'?>
   
    </references>

    <!-- -->
  </back>
</rfc>