<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.2.10 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>

<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>

<rfc ipr="trust200902" docName="draft-schinazi-quic-h3-datagram-00" category="exp">

  <front>
    <title abbrev="HTTP/3 Datagrams">Using QUIC Datagrams with HTTP/3</title>

    <author initials="D." surname="Schinazi" fullname="David Schinazi">
      <organization>Google LLC</organization>
      <address>
        <postal>
          <street>1600 Amphitheatre Parkway</street>
          <city>Mountain View, California 94043</city>
          <country>United States of America</country>
        </postal>
        <email>dschinazi.ietf@gmail.com</email>
      </address>
    </author>

    <date year="2019" month="October" day="21"/>

    
    
    <keyword>Internet-Draft</keyword>

    <abstract>


<t>The QUIC DATAGRAM extension provides application
protocols running over QUIC with a way to send
unreliable data while leveraging the security and congestion-control properties
of QUIC. However, QUIC DATAGRAM frames do not provide a means to demultiplex
application contexts using them. This document defines how to use QUIC DATAGRAM
frames when the application protocol running over QUIC is HTTP/3,
by adding an identifier at the start of the frame
payload.</t>



    </abstract>


  </front>

  <middle>


<section anchor="intro" title="Introduction">

<t>The QUIC DATAGRAM extension <xref target="I-D.pauly-quic-datagram"/> provides application
protocols running over QUIC <xref target="I-D.ietf-quic-transport"/> with a way to send
unreliable data while leveraging the security and congestion-control properties
of QUIC. However, QUIC DATAGRAM frames do not provide a means to demultiplex
application contexts using them. This document defines how to use QUIC DATAGRAM
frames when the application protocol running over QUIC is HTTP/3
<xref target="I-D.ietf-quic-http"/>, by adding an identifier at the start of the frame
payload.</t>

<t>This design mimics the use of Stream Types in HTTP/3, which provide a
demultiplexing identifier at the start of each unidirectional stream.</t>

<section anchor="defs" title="Conventions and Definitions">

<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 anchor="format" title="HTTP/3 DATAGRAM Frame Format">

<t>When used with HTTP/3, the Datagram Data field of QUIC DATAGRAM frames uses the
following format:</t>

<figure title="HTTP/3 DATAGRAM Frame Format" anchor="h3-datagram-format"><artwork><![CDATA[
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                     Flow Identifier (i)                     ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 HTTP/3 Datagram Payload (*)                 ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>

<t><list style="hanging">
  <t hangText='Flow Identifier:'>
  A variable-length integer indicating the Flow Identifier of the datagram (see
<xref target="flow-id"/>).</t>
  <t hangText='HTTP/3 Datagram Payload:'>
  The payload of the datagram, whose semantics are defined by individual
applications.</t>
</list></t>

<section anchor="flow-id" title="Flow Identifiers">

<t>Flow identifiers represent bidirectional flows of datagrams within a single
QUIC connection. These are effectively equivalent to UDP ports, that allow
basic demultiplexing of application data. The primary role of slow identifiers
is to provide a standard mechanism for demultiplexing application data flows,
which may be destined for different processing threads in the application,
akin to UDP sockets.</t>

<t>Beyond this, a sender SHOULD ensure that DATAGRAM frames within a single flow
are transmitted in order relative to one another. If multiple DATAGRAM frames
can be packed into a single QUIC packet, the sender SHOULD group them by Flow
Identifier to promote fate-sharing within a specific flow and improve the
ability to process batches of datagram messages efficiently on the receiver.</t>

</section>
</section>
<section anchor="flow-id-alloc" title="Flow Identifier Allocation">

<t>Implementations of HTTP/3 that support the DATAGRAM extension will provide a
flow identifier allocation service. That service will allow applications
co-located with HTTP/3 to request a unique Flow Identifier that they can
subsequently use for their own purposes. The HTTP/3 implementation will then
parse the Flow Identifier of incoming DATAGRAM frames and use it to deliver the
frame to the appropriate application.</t>

</section>
<section anchor="security" title="Security Considerations">

<t>This document currently does not have additional security considerations on top
of the ones defined in <xref target="I-D.ietf-quic-transport"/> and
<xref target="I-D.pauly-quic-datagram"/>.</t>

</section>
<section anchor="iana" title="IANA Considerations">

<t>This document has no IANA actions.</t>

</section>


  </middle>

  <back>

    <references title='Normative References'>





<reference anchor="I-D.pauly-quic-datagram">
<front>
<title>An Unreliable Datagram Extension to QUIC</title>

<author initials='T' surname='Pauly' fullname='Tommy Pauly'>
    <organization />
</author>

<author initials='E' surname='Kinnear' fullname='Eric Kinnear'>
    <organization />
</author>

<author initials='D' surname='Schinazi' fullname='David Schinazi'>
    <organization />
</author>

<date month='July' day='6' year='2019' />

<abstract><t>This document defines an extension to the QUIC transport protocol to add support for sending and receiving unreliable datagrams over a QUIC connection.</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-pauly-quic-datagram-03' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-pauly-quic-datagram-03.txt' />
</reference>



<reference anchor="I-D.ietf-quic-transport">
<front>
<title>QUIC: A UDP-Based Multiplexed and Secure Transport</title>

<author initials='J' surname='Iyengar' fullname='Jana Iyengar'>
    <organization />
</author>

<author initials='M' surname='Thomson' fullname='Martin Thomson'>
    <organization />
</author>

<date month='September' day='11' year='2019' />

<abstract><t>This document defines the core of the QUIC transport protocol. Accompanying documents describe QUIC's loss detection and congestion control and the use of TLS for key negotiation.  Note to Readers  Discussion of this draft takes place on the QUIC working group mailing list (quic@ietf.org), which is archived at &lt;https://mailarchive.ietf.org/arch/search/?email_list=quic>.  Working Group information can be found at &lt;https://github.com/ quicwg>; source code and issues list for this draft can be found at &lt;https://github.com/quicwg/base-drafts/labels/-transport>.</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-ietf-quic-transport-23' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-quic-transport-23.txt' />
</reference>



<reference anchor="I-D.ietf-quic-http">
<front>
<title>Hypertext Transfer Protocol Version 3 (HTTP/3)</title>

<author initials='M' surname='Bishop' fullname='Mike Bishop'>
    <organization />
</author>

<date month='September' day='12' year='2019' />

<abstract><t>The QUIC transport protocol has several features that are desirable in a transport for HTTP, such as stream multiplexing, per-stream flow control, and low-latency connection establishment.  This document describes a mapping of HTTP semantics over QUIC.  This document also identifies HTTP/2 features that are subsumed by QUIC, and describes how HTTP/2 extensions can be ported to HTTP/3.</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-ietf-quic-http-23' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-quic-http-23.txt' />
</reference>



<reference  anchor="RFC2119" target='https://www.rfc-editor.org/info/rfc2119'>
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='S. Bradner'><organization /></author>
<date year='1997' month='March' />
<abstract><t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t></abstract>
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='2119'/>
<seriesInfo name='DOI' value='10.17487/RFC2119'/>
</reference>



<reference  anchor="RFC8174" target='https://www.rfc-editor.org/info/rfc8174'>
<front>
<title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
<author initials='B.' surname='Leiba' fullname='B. Leiba'><organization /></author>
<date year='2017' month='May' />
<abstract><t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t></abstract>
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='8174'/>
<seriesInfo name='DOI' value='10.17487/RFC8174'/>
</reference>




    </references>



<section numbered="false" anchor="acks" title="Acknowledgments">

<t>The DATAGRAM frame identifier was previously part of the DATAGRAM frame
definition itself, the author would like to acknowledge the authors of
that document and the members of the IETF QUIC working group for their
suggestions.</t>

</section>


  </back>

<!-- ##markdown-source:
H4sIABhMrl0AA+1YXW8jtxV956+4lV82jUa1126SFRCgirXOCrDX7lpuUBRB
Qc1QEuEZckpyrCiu9rfnXHIkS2PHQNDmLfaDORzyfpx77sc4yzIRdCjVkO68
Ngv6+93knMYyyIWTlaeVDkv6MJ3e/OVUyNnMqYdh+/h0SBQ2N7KCiMLJech8
vtRG/qyz/zQ6z5anWdGeFLkMamHdekjqp1oIXbshBdf48Pb4+N3xW3Gv1ivr
iiFNTFDOqJCNWaIQPkhT/FuW1kDLWnlR6yH9K9i8T9664NTcY7WuePGjELIJ
S+uGgjJB+NHGD6k3HtBta1kvbiebe2P5oIvOK+sW0uifZdDW4Mj31i5KRZeX
5+m1h0YV8OLkq+NjGlX1EjApiV26ke5+JdfpXK4DfO1d2cYEqQ39Q6tVn85l
qefWGS3p3dnx2Wl7lg8xNL07o4OCRQFoebJzKFBO5zKdU5XUJaDeojzQKsz/
tuDdQW4rIUSWZSRnsFHmgG66VG1QR9PR959GV8A+KOPhGT0+/mmSjQe1bMp1
itY2VJsN1c4CGFgg67qEesZCYBOo29KTa4xhwtgH5ZKCVhrbk4TBAuNrxAfS
IpEkARoKlrwyhWiMU6WWMyDLamm11FiWCgLlgkUDU5zMGwcYCQQARmahPBuS
YRmcLdnKWrmgwQkgxXYM6INdsZB+x+85/II7hSVjw9Y92FQpmMlWFapqyqDr
Uv0k9pxmtQGgeWp8a1Y1oOlSs6y8qZQJuDrXBsKXdsWSGt8BXbTKV0tlol/7
8regvoApdLTZ9wzdZQj1ZtOnGbApCr4mDcEjE/Rc474MCcAgXWAW8UO0QtRy
XVpZDFquVLooSiXEE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