httpbis K. Oku Internet-Draft Fastly Intended status: Standards Track L. Pardue Expires: 19 August 2024 Cloudflare 16 February 2024 HTTP/3 on Streams draft-kazuho-httpbis-http3-on-streams-00 Abstract This document specifies how to use HTTP/3 on top of bi-directional, byte-oriented streams such as TLS over TCP. Discussion Venues This note is to be removed before publishing as an RFC. Discussion of this document takes place on the HTTP Working Group mailing list (ietf-http-wg@w3.org), which is archived at https://lists.w3.org/Archives/Public/ietf-http-wg/. Source for this draft and an issue tracker can be found at https://github.com/kazuho/draft-kazuho-httpbis-http3-on-streams. 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 19 August 2024. Copyright Notice Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved. Oku & Pardue Expires 19 August 2024 [Page 1] Internet-Draft HTTP/3 on Streams February 2024 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 Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Conventions and Definitions . . . . . . . . . . . . . . . . . 3 3. The Protocol . . . . . . . . . . . . . . . . . . . . . . . . 3 4. Starting HTTP/3 on Streams . . . . . . . . . . . . . . . . . 3 5. Support for Extended CONNECT . . . . . . . . . . . . . . . . 4 6. Security Considerations . . . . . . . . . . . . . . . . . . . 4 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 4 8.1. Normative References . . . . . . . . . . . . . . . . . . 4 8.2. Informative References . . . . . . . . . . . . . . . . . 5 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 5 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 5 1. Introduction As of 2023, HTTP/2 [HTTP2] remains the most widely used version of HTTP across the Internet, although the adoption rate of HTTP/3 [HTTP3] is increasing rapidly. HTTP/3 has several advantages over HTTP/2, primarily due to its use of QUIC [QUIC] as the transport layer protocol, which provides features like stream multiplexing without head-of-line blocking and low-latency connection establishment. However, given that QUIC's availability and accessibility are not as universal as TCP's, a complete migration of all HTTP/2 traffic to QUIC-based HTTP/3 seems unlikely. This situation necessitates HTTP deployments to support both transport protocols and their respective HTTP versions for the foreseeable future. Oku & Pardue Expires 19 August 2024 [Page 2] Internet-Draft HTTP/3 on Streams February 2024 Maintaining dual support is costly, as the two protocols differ in many aspects such as wire-encoding, flow control and stream multiplexing machinery, and HTTP header compression. Extensions operating at the HTTP wire encoding layer must be developed and implemented for both HTTP/2 and HTTP/3, and both protocol stacks require ongoing maintenance to address bugs, performance issues, and vulnerabilities. To address this redundancy, this specification defines the method of running HTTP/3 over TCP, utilizing QUIC on Streams [QUIC-ON-STREAMS] as the basis. QUIC on Streams, acting as a polyfill of QUIC atop bi- directional byte streams, enables the operation of HTTP/3 over TCP without any modifications. Consequently, design, implementation, and maintenance efforts can concentrate on a single HTTP version: HTTP/3. 2. Conventions and Definitions 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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. 3. The Protocol HTTP/3 functions over QUIC version 1, employing the set of operations (i.e., API) defined in Section 2.4 and Section 5.3 of [QUIC]. Conversely, HTTP/3 on Streams utilizes the same set of operations but functions over QUIC on Streams instead. 4. Starting HTTP/3 on Streams HTTP/3 on Streams can be used for “http” and “https” URI schemes defined in Section 4.2 of [HTTP-SEMANTICS] with the same default port numbers as HTTP/1.1 [HTTP1]. When starting HTTP/3 on Streams for “https” URIs, clients use the TLS [TLS13] with the ALPN [ALPN] extension: “h3s”. Also, clients may learn that a particular server supports HTTP/3 on Streams by other means. A client that knows that a server supports HTTP/3 on Streams can establish a TCP connection and start exchanging HTTP/3 frames using QUIC on Streams. The latter is the only way to discover HTTP/3 on Streams for “http” URIs. Oku & Pardue Expires 19 August 2024 [Page 3] Internet-Draft HTTP/3 on Streams February 2024 When used in cleartext, servers can determine if or not the client is speaking HTTP/3 on Streams by comparing the first eight bytes to the encoded form of the QS_TRANSPORT_PARAMETERS frame type (Section 4.2 of [QUIC-ON-STREAMS]). 5. Support for Extended CONNECT Servers speaking HTTP/3 on Streams MUST implement the Extended CONNECT scheme defined in [EXT-CONNECT3]. 6. Security Considerations TODO Security 7. IANA Considerations This document has no IANA actions. 8. References 8.1. Normative References [ALPN] Friedl, S., Popov, A., Langley, A., and E. Stephan, "Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, July 2014, . [EXT-CONNECT3] Hamilton, R., "Bootstrapping WebSockets with HTTP/3", RFC 9220, DOI 10.17487/RFC9220, June 2022, . [HTTP-SEMANTICS] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "HTTP Semantics", STD 97, RFC 9110, DOI 10.17487/RFC9110, June 2022, . [HTTP1] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "HTTP/1.1", STD 99, RFC 9112, DOI 10.17487/RFC9112, June 2022, . [HTTP3] Bishop, M., Ed., "HTTP/3", RFC 9114, DOI 10.17487/RFC9114, June 2022, . [QUIC-ON-STREAMS] Oku, K. and L. Pardue, "QUIC on Streams", Work in Progress, Internet-Draft, draft-kazuho-quic-quic-on- Oku & Pardue Expires 19 August 2024 [Page 4] Internet-Draft HTTP/3 on Streams February 2024 streams-00, 16 February 2024, . [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, . [TLS13] Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, . 8.2. Informative References [HTTP2] Thomson, M., Ed. and C. Benfield, Ed., "HTTP/2", RFC 9113, DOI 10.17487/RFC9113, June 2022, . [QUIC] Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based Multiplexed and Secure Transport", RFC 9000, DOI 10.17487/RFC9000, May 2021, . Acknowledgments TODO acknowledge. Authors' Addresses Kazuho Oku Fastly Email: kazuhooku@gmail.com Lucas Pardue Cloudflare Email: lucas@lucaspardue.com Oku & Pardue Expires 19 August 2024 [Page 5]