<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!DOCTYPE rfc [
<!ENTITY nbsp "&#160;">
<!ENTITY zwsp "&#8203;">
<!ENTITY nbhy "&#8209;">
<!ENTITY wj "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" docName="draft-blanchet-quic-peerhints-00" ipr="trust200902" obsoletes="" updates="" submissionType="IETF" xml:lang="en" version="3">
  <front>
    <title abbrev="Priming QUIC with Peer Hints">Priming QUIC with Peer Hints for Atypical Networks, such as Delay-Tolerant Networks(DTN)</title>
    <seriesInfo name="Internet-Draft" value="draft-blanchet-quic-peerhints-00"/>
    <author fullname="Marc Blanchet" initials="MB">
      <organization>Viagenie</organization>
      <address><email>marc.blanchet@viagenie.ca</email></address>
    </author>
    <date year="2023"/>
    <area>Transport</area>
    <workgroup>Internet Engineering Task Force</workgroup>
    <keyword>http</keyword>
    <keyword>http3</keyword>
    <keyword>dtn</keyword>
    <keyword>quic</keyword>
    <abstract>
      <t>Abstract</t>
    </abstract>
  </front>
  <middle>
    <section>
      <name>Introduction</name>
      <t>Long delay networks such as in space communications may possibly use the IP protocol as IP as no notion of delivery time. However, it requires that the transport and application layers work properly in the context of long delays. In space radio communications, it is typical to have delays in order of multiple minutes and maybe hours. This document describes a configuration profile for QUIC and HTTP3 implementations to properly work in these scenarios. It can also be used for any use case where some initial QUIC parameters should be changed from the defaults.</t>
      <section anchor="requirements">
        <name>Requirements Language</name>
        <t>The key words "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 <xref target="RFC2119"/>
          <xref target="RFC8174"/> when, and only when, they appear in
          all capitals, as shown here.</t>
      </section>
    </section>
    <section>
      <name>Peer Hints</name>
      <t>A QUIC stack is primed with a config that defines various parameters for a destination, so that the QUIC stack converges faster. For example, when a network is known to be "far", with a large and known in advance latency, such as in space, the QUIC stack is primed with an initial RTT of that destination, for example 20 minutes, so that the QUIC RTT calculation is converging much faster and does not generate a lot of useless retransmits and does not timeout. It should be noted that these priming values are just hints and the QUIC stack may decide to not honor them, or to use more prudent values. For example, if the value is very large, the QUIC stack may decide to start with half of the proposed value.
      </t>
      <t>The properties and their values are as follows. All values must follow the maximums specified in their corresponding definitions in QUIC RFCs.</t>
        <ul>
          <li>destination: an IPv4 prefix in CIDR format <xref target="RFC4632"/> or an IPv6 prefix <xref target="RFC4291"/>. A single host may be expressed without the /length suffix.</li>
          <li>initial_rtt: unsigned integer. in ms. see <xref target="RFC9002"/> section 6.2.2</li>
          <li>max_idle_timeout: unsigned integer. in ms. see <xref target="RFC9000"/> section 18.2</li>
          <li>active_connection_id_limit: unsigned integer. see <xref target="RFC9000"/> section 18.2</li>
          <li>TBD: others?</li>
        </ul>
    </section>
    <section>
        <name>File Format</name>
        <t>The values are expressed in a JSON object, typically stored as a file.</t>
        <t>The top-level properties are as follows:</t>
        <ul>
            <li>type: mandatory. always set to "quicPeerHints". This enables identification of that file outside of the expected context.</li>
            <li>version: mandatory. this document set to 1. New specifications may define new versions.</li>
            <li>lastUpdated: mandatory. the last time this file was updated in <xref target="RFC3339"/> format</li>
            <li>quicHints: mandatory. a non-empty array of hints</li>
        </ul>
        <t>The following is an example:</t>
        <sourcecode type="json" markers="true">
            <![CDATA[
{
  "type": "quicPeerHints",
  "version": 1,
  "lastUpdated": "2025-01-17T23:20:50Z",
  "quicHints": [
    {
      "destination": "2001:db8:1234::/48",
      "initial_rtt": 600000,
      "max_idle_timeout": 1500000,
      "active_connection_id_limit": 100000
    },
    {
      "destination": "192.0.2.0/24",
      "initial_rtt": 30000,
      "max_idle_timeout": 100000,
      "active_connection_id_limit": 10000
    }
  ]
}
            ]]>
          </sourcecode>
    </section>
    <section>
      <name>Considerations</name>
      <t>The mechanism to distribute such configuration to the QUIC stack is undefined in this document. For the use case that triggered this work, space networking, it is expected that these configuration will be fairly static, loaded in advance and very seldomly need to be updated. However, other use cases may require updates more often and therefore may need a protocol to distribute such configuration. A possible candidate protocol to update this configuration is <xref target="RFC8175"/> but that would apply to networks reachable via a single link where all the characteristics are inherited from that link.</t>
      <t>Similarly to typical forwarding and routing algorithms, if a destination address matches multiple address prefixes, the most specific prefix will be used as a match. In case multiple prefixes have the same length, the last one encountered while parsing the file is the one used as a match</t>
      <t>Some configuration values are defined in this document. However, it is possible that other parameters might need to be added in the future. Therefore, an IANA registry of values is defined to support future definition of parameters. The actual possible values or range of values for a specific parameter is not shown in the IANA registry. Discussion on the semantics of the parameter, its possible values, etc... must be in the referenced document. The IANA registry only contains the JSON syntax useful for a JSON parser. </t>
    </section>
    <section anchor="IANA">
      <name>IANA Considerations</name>
      <t>TBD. policy: specification required and expert review. </t>
      <t>columns: JSON property name, JSON object type, reference</t>
    </section>
    <section anchor="Security">
      <name>Security Considerations</name>
      <t>If a QUIC stack is configured by this mechanism with a bad configuration, it may result in a denial-of-service attack, as for example, putting very low timeouts that would trigger timeouts for some or all networks, therefore denying any connection. To minimize those issues, the QUIC stack should accept values only within a certain range, that makes sense for the use cases of the QUIC stack. Moreover, while the destination values of :: or 0.0.0.0/0 are permitted by this document, the QUIC stack may disable these values as they would be applied to all destinations: in such case, some messages should be logged.</t>
    </section>
    <section>
         <name>TODO and Comments (section to be deleted when ready for publication)</name>
         <t>a list of TODOs and comments not yet resolved in this version</t>
         <ul>
             <li>MT: remove active_connection_id_limit as not needed since negotiated and not need to be primed</li>
             <li>MT: consider initial congestion window. CH: Not tying the CWIN: very good. Starting with extra large CWIN can be very risky. </li>
             <li>CH: The idle timeout tends to be application specific. LP: h3-nginx config parameter in quiche</li>
             <li>CH: DOS attacks with spoofed packets. A single spoofed with address in the selected range will tie connection resource for a long time.</li>
             <li>MT: consider domain names. MB: I disagree because side effects of TTL=0, split views, ...</li>
         </ul>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.3339.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.4291.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.4632.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.9000.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.9002.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8175.xml"/>
      </references>
    </references>
    <section anchor="Acknowledgements" numbered="false">
      <name>Acknowledgements</name>
      <t>This work is based on extensive testing of QUIC and HTTP3 implementations and working closely with implementers. There are acknowledged here: Martin Thompson, Christian Huitema, Ian Swett, Michael Bishop. It is also the result of initial discussions with Eric Kinnear, Maxime Piraux, François Michel. All bad ideas are from the author.</t>
        <t>This document has been reviewed and commented by the following people, in no particular order: Martin Thompson, Lucas Purdue, Christian Huitema.</t>
    </section>
  </back>
</rfc>
