idnits 2.17.1 draft-schinazi-masque-h3-datagram-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (12 December 2020) is 1224 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-10) exists of draft-ietf-quic-datagram-01 == Outdated reference: A later version (-34) exists of draft-ietf-quic-http-32 == Outdated reference: A later version (-34) exists of draft-ietf-quic-transport-32 Summary: 0 errors (**), 0 flaws (~~), 4 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group D. Schinazi 3 Internet-Draft Google LLC 4 Intended status: Standards Track 12 December 2020 5 Expires: 15 June 2021 7 Using QUIC Datagrams with HTTP/3 8 draft-schinazi-masque-h3-datagram-00 10 Abstract 12 The QUIC DATAGRAM extension provides application protocols running 13 over QUIC with a mechanism to send unreliable data while leveraging 14 the security and congestion-control properties of QUIC. However, 15 QUIC DATAGRAM frames do not provide a means to demultiplex 16 application contexts. This document defines how to use QUIC DATAGRAM 17 frames when the application protocol running over QUIC is HTTP/3 by 18 adding an identifier at the start of the frame payload. 20 Discussion of this work is encouraged to happen on the MASQUE IETF 21 mailing list (masque@ietf.org (mailto:masque@ietf.org)) or on the 22 GitHub repository which contains the draft: 23 https://github.com/DavidSchinazi/draft-h3-datagram. 25 Status of This Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at https://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on 15 June 2021. 42 Copyright Notice 44 Copyright (c) 2020 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 49 license-info) in effect on the date of publication of this document. 50 Please review these documents carefully, as they describe your rights 51 and restrictions with respect to this document. Code Components 52 extracted from this document must include Simplified BSD License text 53 as described in Section 4.e of the Trust Legal Provisions and are 54 provided without warranty as described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 59 1.1. Conventions and Definitions . . . . . . . . . . . . . . . 3 60 2. HTTP/3 DATAGRAM Frame Format . . . . . . . . . . . . . . . . 3 61 2.1. Flow Identifiers . . . . . . . . . . . . . . . . . . . . 3 62 3. Flow Identifier Allocation . . . . . . . . . . . . . . . . . 4 63 4. The H3_DATAGRAM HTTP/3 SETTINGS Parameter . . . . . . . . . . 4 64 5. Security Considerations . . . . . . . . . . . . . . . . . . . 5 65 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 66 7. Normative References . . . . . . . . . . . . . . . . . . . . 5 67 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 6 68 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 6 70 1. Introduction 72 The QUIC DATAGRAM extension [DGRAM] provides application protocols 73 running over QUIC [QUIC] with a mechanism to send unreliable data 74 while leveraging the security and congestion-control properties of 75 QUIC. However, QUIC DATAGRAM frames do not provide a means to 76 demultiplex application contexts. This document defines how to use 77 QUIC DATAGRAM frames when the application protocol running over QUIC 78 is HTTP/3 [H3] by adding an identifier at the start of the frame 79 payload. 81 This design mimics the use of Stream Types in HTTP/3, which provide a 82 demultiplexing identifier at the start of each unidirectional stream. 84 Discussion of this work is encouraged to happen on the MASQUE IETF 85 mailing list (masque@ietf.org (mailto:masque@ietf.org)) or on the 86 GitHub repository which contains the draft: 87 https://github.com/DavidSchinazi/draft-h3-datagram. 89 1.1. Conventions and Definitions 91 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 92 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 93 "OPTIONAL" in this document are to be interpreted as described in BCP 94 14 [RFC2119] [RFC8174] when, and only when, they appear in all 95 capitals, as shown here. 97 2. HTTP/3 DATAGRAM Frame Format 99 When used with HTTP/3, the Datagram Data field of QUIC DATAGRAM 100 frames uses the following format: 102 0 1 2 3 103 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 104 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 105 | Flow Identifier (i) ... 106 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 107 | HTTP/3 Datagram Payload (*) ... 108 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 110 Figure 1: HTTP/3 DATAGRAM Frame Format 112 Flow Identifier: A variable-length integer indicating the Flow 113 Identifier of the datagram (see Section 2.1). 115 HTTP/3 Datagram Payload: The payload of the datagram, whose 116 semantics are defined by individual applications. 118 2.1. Flow Identifiers 120 Flow identifiers represent bidirectional flows of datagrams within a 121 single QUIC connection. These are conceptually similar to streams in 122 the sense that they allow multiplexing of application data. Of 123 course flows lack any of the ordering or reliability guarantees of 124 streams. 126 Beyond this, a sender SHOULD ensure that DATAGRAM frames within a 127 single flow are transmitted in order relative to one another. If 128 multiple DATAGRAM frames can be packed into a single QUIC packet, the 129 sender SHOULD group them by flow identifier to promote fate-sharing 130 within a specific flow and improve the ability to process batches of 131 datagram messages efficiently on the receiver. 133 3. Flow Identifier Allocation 135 Implementations of HTTP/3 that support the DATAGRAM extension MUST 136 provide a flow identifier allocation service. That service will 137 allow applications co-located with HTTP/3 to request a unique flow 138 identifier that they can subsequently use for their own purposes. 139 The HTTP/3 implementation will then parse the flow identifier of 140 incoming DATAGRAM frames and use it to deliver the frame to the 141 appropriate application. 143 Even flow identifiers are client-initiated, while odd flow 144 identifiers are server-initiated. This means that an HTTP/3 client 145 implementation of the flow identifier allocation service MUST only 146 provide even identifiers, while a server implementation MUST only 147 provide odd identifiers. Note that, once allocated, any flow 148 identifier can be used by both client and server - only allocation 149 carries separate namespaces to avoid requiring synchronization. 151 4. The H3_DATAGRAM HTTP/3 SETTINGS Parameter 153 Implementations of HTTP/3 that support this mechanism can indicate 154 that to their peer by sending the H3_DATAGRAM SETTINGS parameter with 155 a value of 1. The value of the H3_DATAGRAM SETTINGS parameter MUST 156 be either 0 or 1. A value of 0 indicates that this mechanism is not 157 supported. An endpoint that receives the H3_DATAGRAM SETTINGS 158 parameter with a value that is neither 0 or 1 MUST terminate the 159 connection with error H3_SETTINGS_ERROR. 161 And endpoint that sends the H3_DATAGRAM SETTINGS parameter with a 162 value of 1 MUST send the max_datagram_frame_size QUIC Transport 163 Parameter [DGRAM]. An endpoint that receives the H3_DATAGRAM 164 SETTINGS parameter with a value of 1 on a QUIC connection that did 165 not also receive the max_datagram_frame_size QUIC Transport Parameter 166 MUST terminate the connection with error H3_SETTINGS_ERROR. 168 When clients use 0-RTT, they MAY store the value of the server's 169 H3_DATAGRAM SETTINGS parameter. Doing so allows the client to use 170 HTTP/3 datagrams in 0-RTT packets. When servers decide to accept 171 0-RTT data, they MUST send a H3_DATAGRAM SETTINGS parameter greater 172 or equal to the value they sent to the client in the connection where 173 they sent them the NewSessionTicket message. If a client stores the 174 value of the H3_DATAGRAM SETTINGS parameter with their 0-RTT state, 175 they MUST validate that the new value of the H3_DATAGRAM SETTINGS 176 parameter sent by the server in the handshake is greater or equal to 177 the stored value; if not, the client MUST terminate the connection 178 with error H3_SETTINGS_ERROR. 180 5. Security Considerations 182 This document currently does not have additional security 183 considerations beyond those defined in [QUIC] and [DGRAM]. 185 6. IANA Considerations 187 This document will request IANA to register the following entry in 188 the "HTTP/3 Settings" registry: 190 +--------------+-------+---------------+---------+ 191 | Setting Name | Value | Specification | Default | 192 +==============+=======+===============+=========+ 193 | H3_DATAGRAM | 0x276 | This Document | 0 | 194 +--------------+-------+---------------+---------+ 196 7. Normative References 198 [DGRAM] Pauly, T., Kinnear, E., and D. Schinazi, "An Unreliable 199 Datagram Extension to QUIC", Work in Progress, Internet- 200 Draft, draft-ietf-quic-datagram-01, 24 August 2020, 201 . 204 [H3] Bishop, M., "Hypertext Transfer Protocol Version 3 205 (HTTP/3)", Work in Progress, Internet-Draft, draft-ietf- 206 quic-http-32, 20 October 2020, . 209 [QUIC] Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed 210 and Secure Transport", Work in Progress, Internet-Draft, 211 draft-ietf-quic-transport-32, 20 October 2020, 212 . 215 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 216 Requirement Levels", BCP 14, RFC 2119, 217 DOI 10.17487/RFC2119, March 1997, 218 . 220 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 221 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 222 May 2017, . 224 Acknowledgments 226 The DATAGRAM frame identifier was previously part of the DATAGRAM 227 frame definition itself, the author would like to acknowledge the 228 authors of that document and the members of the IETF QUIC working 229 group for their suggestions. Additionally, the author would like to 230 thank Martin Thomson for suggesting the use of an HTTP/3 SETTINGS 231 parameter. 233 Author's Address 235 David Schinazi 236 Google LLC 237 1600 Amphitheatre Parkway 238 Mountain View, California 94043, 239 United States of America 241 Email: dschinazi.ietf@gmail.com