Skip to main content

A Two Rate Three Color Marker
draft-heinanen-diffserv-trtcm-01

Revision differences

Document history

Date Rev. By Action
1999-08-26
01 (System) IESG has approved the document
1999-05-17
01 (System) New version available: draft-heinanen-diffserv-trtcm-01.txt
1999-03-29
00 (System)
New version available: Copyright (c) 2023 IETF Trust and the persons identified as the
  document authors.  All rights reserved.

  This document is subject …
New version available: Copyright (c) 2023 IETF Trust and the persons identified as the
  document authors.  All rights reserved.

  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  . . . . . . . . . . . . . . . . . . . . . . . .  3
    1.1.  Terminology . . . . . . . . . . . . . . . . . . . . . . .  3
  2.  Protocol Overview . . . . . . . . . . . . . . . . . . . . . .  3
  3.  Session Establishment . . . . . . . . . . . . . . . . . . . .  4
    3.1.  Establishing a Transport-Capable HTTP/3 Connection  . . .  4
    3.2.  Extended CONNECT in HTTP/3  . . . . . . . . . . . . . . .  5
    3.3.  Creating a New Session  . . . . . . . . . . . . . . . . .  5
    3.4.  Limiting the Number of Simultaneous Sessions  . . . . . .  6
    3.5.  Prioritization  . . . . . . . . . . . . . . . . . . . . .  7
  4.  WebTransport Features . . . . . . . . . . . . . . . . . . . .  7
    4.1.  Unidirectional streams  . . . . . . . . . . . . . . . . .  8
    4.2.  Bidirectional Streams . . . . . . . . . . . . . . . . . .  8
    4.3.  Resetting Data Streams  . . . . . . . . . . . . . . . . .  9
    4.4.  Datagrams . . . . . . . . . . . . . . . . . . . . . . . .  11
    4.5.  Buffering Incoming Streams and Datagrams  . . . . . . . .  11
    4.6.  Interaction with HTTP/3 GOAWAY frame  . . . . . . . . . .  11
  5.  Session Termination . . . . . . . . . . . . . . . . . . . . .  12
  6.  Negotiating the Draft Version . . . . . . . . . . . . . . . .  13
  7.  Security Considerations . . . . . . . . . . . . . . . . . . .  13
  8.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  14
    8.1.  Upgrade Token Registration  . . . . . . . . . . . . . . .  14
    8.2.  HTTP/3 SETTINGS Parameter Registration  . . . . . . . . .  14
    8.3.  Frame Type Registration . . . . . . . . . . . . . . . . .  15
    8.4.  Stream Type Registration  . . . . . . . . . . . . . . . .  15
    8.5.  HTTP/3 Error Code Registration  . . . . . . . . . . . . .  16
    8.6.  Capsule Types . . . . . . . . . . . . . . . . . . . . . .  16
  9.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  17
    9.1.  Normative References  . . . . . . . . . . . . . . . . . .  17
    9.2.  Informative References  . . . . . . . . . . . . . . . . .  18
  Appendix A.  Changelog  . . . . . . . . . . . . . . . . . . . . .  18
    A.1.  Changes between draft versions 02 and 07  . . . . . . . .  19
  Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  19

Frindell, et al.          Expires 25 April 2024                [Page 2]
Internet-Draft              WebTransport-H3                October 2023

1.  Introduction

  HTTP/3 [HTTP3] is a protocol defined on top of QUIC [RFC9000] that
  can multiplex HTTP requests over a QUIC connection.  This document
  defines a mechanism for multiplexing non-HTTP data with HTTP/3 in a
  manner that conforms with the WebTransport protocol requirements and
  semantics[OVERVIEW].  Using the mechanism described here, multiple
  WebTransport instances can be multiplexed simultaneously with regular
  HTTP traffic on the same HTTP/3 connection.

1.1.  Terminology

  The keywords "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.

  This document follows terminology defined in Section 1.2 of
  [OVERVIEW].  Note that this document distinguishes between a
  WebTransport server and an HTTP/3 server.  An HTTP/3 server is the
  server that terminates HTTP/3 connections; a WebTransport server is
  an application that accepts WebTransport sessions, which can be
  accessed via an HTTP/3 server.

2.  Protocol Overview

  WebTransport servers in general are identified by a pair of authority
  value and path value (defined in [RFC3986] Sections 3.2 and 3.3
  correspondingly).

  When an HTTP/3 connection is established, both the client and server
  have to send a SETTINGS_WEBTRANSPORT_MAX_SESSIONS setting in order to
  indicate that they both support WebTransport over HTTP/3.  This
  process also negotiates the use of additional HTTP/3 extensions.

  WebTransport sessions are initiated inside a given HTTP/3 connection
  by the client, who sends an extended CONNECT request [RFC8441].  If
  the server accepts the request, a WebTransport session is
  established.  The resulting stream will be further referred to as a
  _CONNECT stream_, and its stream ID is used to uniquely identify a
  given WebTransport session within the connection.  The ID of the
  CONNECT stream that established a given WebTransport session will be
  further referred to as a _Session ID_.

  After the session is established, the peers can exchange data using
  the following mechanisms:

Frindell, et al.          Expires 25 April 2024                [Page 3]
Internet-Draft              WebTransport-H3                October 2023

  *  A client can create a bidirectional stream and transfer its
      ownership to WebTransport by providing a special signal in the
      first bytes.

  *  A server can create a bidirectional stream and transfer its
      ownership to WebTransport by providing a special signal in the
      first bytes..

  *  Both client and server can create a unidirectional stream using a
      special stream type.

  *  A datagram can be sent using HTTP Datagrams [HTTP-DATAGRAM].

  A WebTransport session is terminated when the CONNECT stream that
  created it is closed.

3.  Session Establishment

3.1.  Establishing a Transport-Capable HTTP/3 Connection

  In order to indicate support for WebTransport, both the client and
  the server MUST send a SETTINGS_WEBTRANSPORT_MAX_SESSIONS value
  greater than "0" in their SETTINGS frame.  The default value for the
  SETTINGS_WEBTRANSPORT_MAX_SESSIONS parameter is "0", meaning that the
  endpoint is not willing to receive any WebTransport sessions.  Note
  that the client only needs to send a value greater than "0"; since
  clients initiate WebTransport sessions, the actual value is not
  significant.

  The client MUST NOT send a WebTransport request until it has received
  the setting indicating WebTransport support from the server.

  [[RFC editor: please remove the following paragraph before
  publication.]]

  Similarly, the server MUST NOT process any incoming WebTransport
  requests until the client settings have been received, as the client
  may be using a version of the WebTransport extension that is
  different from the one used by the server.

  Because WebTransport over HTTP/3 requires support for HTTP/3
  datagrams and the Capsule Protocol, both the client and the server
  MUST indicate support for HTTP/3 datagrams by sending a
  SETTINGS_H3_DATAGRAM value set to 1 in their SETTINGS frame (see
  Section 2.1.1 of [HTTP-DATAGRAM]).

Frindell, et al.          Expires 25 April 2024                [Page 4]
Internet-Draft              WebTransport-H3                October 2023

  WebTransport over HTTP/3 also requires support for QUIC datagrams.
  To indicate support, both the client and the server MUST send a
  max_datagram_frame_size transport parameter with a value greater than
  0 (see Section 3 of [QUIC-DATAGRAM]).

3.2.  Extended CONNECT in HTTP/3

  [RFC8441] defines an extended CONNECT method in Section 4, enabled by
  the SETTINGS_ENABLE_CONNECT_PROTOCOL setting.  That setting is
  defined for HTTP/3 by [RFC9220].  A client supporting WebTransport
  over HTTP/3 MUST send the SETTINGS_WEBTRANSPORT_MAX_SESSIONS setting
  with a value greater than "0".  A server supporting WebTransport over
  HTTP/3 MUST send both the SETTINGS_WEBTRANSPORT_MAX_SESSIONS setting
  with a value greater than "0" and the
  SETTINGS_ENABLE_CONNECT_PROTOCOL setting with a value of "1".

3.3.  Creating a New Session

  As WebTransport sessions are established over HTTP/3, they are
  identified using the https URI scheme ([HTTP], Section 4.2.2).

  In order to create a new WebTransport session, a client can send an
  HTTP CONNECT request.  The :protocol pseudo-header field ([RFC8441])
  MUST be set to webtransport.  The :scheme field MUST be https.  Both
  the :authority and the :path value MUST be set; those fields indicate
  the desired WebTransport server.  If the WebTransport session is
  coming from a browser client, an Origin header [RFC6454] MUST be
  provided within the request; otherwise, the header is OPTIONAL.

  Upon receiving an extended CONNECT request with a :protocol field set
  to webtransport, the HTTP/3 server can check if it has a WebTransport
  server associated with the specified :authority and :path values.  If
  it does not, it SHOULD reply with status code 404 (Section 15.5.5 of
  [HTTP]).  When the request contains the Origin header, the
  WebTransport server MUST verify the Origin header to ensure that the
  specified origin is allowed to access the server in question.  If the
  verification fails, the WebTransport server SHOULD reply with status
  code 403 (Section 15.5.4 of [HTTP]).  If all checks pass, the
  WebTransport server MAY accept the session by replying with a 2xx
  series status code, as defined in Section 15.3 of [HTTP].

  From the client's perspective, a WebTransport session is established
  when the client receives a 2xx response.  From the server's
  perspective, a session is established once it sends a 2xx response.

Frindell, et al.          Expires 25 April 2024                [Page 5]
Internet-Draft              WebTransport-H3                October 2023

  The server may reply with a 3xx response, indicating a redirection
  (Section 15.4 of [HTTP]).  The user agent MUST NOT automatically
  follow such redirects, as the client could potentially already have
  sent data for the WebTransport session in question; it MAY notify the
  client about the redirect.

  Clients cannot initiate WebTransport in 0-RTT packets, as the CONNECT
  method is not considered safe; see Section 10.9 of [HTTP3].  However,
  WebTransport-related SETTINGS parameters may be retained from the
  previous session as described in Section 7.2.4.2 of [HTTP3].  If the
  server accepts 0-RTT, the server MUST NOT reduce the limit of maximum
  open WebTransport sessions from the one negotiated during the
  previous session; such change would be deemed incompatible, and MUST
  result in a H3_SETTINGS_ERROR connection error.

  The webtransport HTTP Upgrade Token uses the Capsule Protocol as
  defined in [HTTP-DATAGRAM].  The Capsule Protocol is negotiated when
  the server sends a 2xx response.  The capsule-protocol header field
  Section 3.4 of [HTTP-DATAGRAM] is not required by WebTransport and
  can safely be ignored by WebTransport endpoints.

3.4.  Limiting the Number of Simultaneous Sessions

  This document defines a SETTINGS_WEBTRANSPORT_MAX_SESSIONS parameter
  that allows the server to limit the maximum number of concurrent
  WebTransport sessions on a single HTTP/3 connection.  The client MUST
  NOT open more sessions than indicated in the server SETTINGS
  parameters.  The server MUST NOT close the connection if the client
  opens sessions exceeding this limit, as the client and the server do
  not have a consistent view of how many sessions are open due to the
  asynchronous nature of the protocol; instead, it MUST reset all of
  the CONNECT streams it is not willing to process with the
  HTTP_REQUEST_REJECTED status defined in [HTTP3].

  Just like other HTTP requests, WebTransport sessions, and data sent
  on those sessions, are counted against flow control limits.  This
  document does not introduce additional mechanisms for endpoints to
  limit the relative amount of flow control credit consumed by
  different WebTransport sessions, however servers that wish to limit
  the rate of incoming requests on any particular session have
  alternative mechanisms:

  *  The HTTP_REQUEST_REJECTED error code defined in [HTTP3] indicates
      to the receiving HTTP/3 stack that the request was not processed
      in any way.

Frindell, et al.          Expires 25 April 2024                [Page 6]
Internet-Draft              WebTransport-H3                October 2023

  *  HTTP status code 429 indicates that the request was rejected due
      to rate limiting [RFC6585].  Unlike the previous method, this
      signal is directly propagated to the application.

3.5.  Prioritization

  WebTransport sessions are initiated using extended CONNECT.  While
  Section 11 of [RFC9218] describes how extensible priorities can be
  applied to data sent on a CONNECT stream, WebTransport extends the
  types of data that are exchanged in relation to the request and
  response, which requires additional considerations.

  WebTransport CONNECT requests and responses MAY contain the Priority
  header field (Section 5 of [RFC9218]); clients MAY reprioritize by
  sending PRIORITY_UPDATE frames (Section 7 of [RFC9218]).  In
  extension to [RFC9218], it is RECOMMENDED that clients and servers
  apply the scheduling guidance in both Section 9 of [RFC9218] and
  Section 10 of [RFC9218] for all data that they send in the enclosing
  WebTransport session, including Capsules, WebTransport streams and
  datagrams.  WebTransport does not provide any priority signaling
  mechanism for streams and datagrams within a WebTransport session;
  such mechanisms can be defined by application protocols using
  WebTransport.  It is RECOMMENDED that such mechanisms only affect
  scheduling within a session and not scheduling of other data on the
  same HTTP/3 connection.

  The client/server priority merging guidance given in Section 8 of
  [RFC9218] also applies to WebTransport session.  For example, a
  client that receives a response Priority header field could alter its
  view of a WebTransport session priority and alter the scheduling of
  outgoing data as a result.

  Endpoints that prioritize WebTransport sessions need to consider how
  they interact with other sessions or requests on the same HTTP/3
  connection.

4.  WebTransport Features

  WebTransport over HTTP/3 provides the following features described in
  [OVERVIEW]: unidirectional streams, bidirectional streams and
  datagrams, initiated by either endpoint.  Protocols designed for use
  with WebTransport over HTTP/3 are constrained to these features.  The
  Capsule Protocol is an implementation detail of WebTransport over
  HTTP/3 and is not a WebTransport feature.

Frindell, et al.          Expires 25 April 2024                [Page 7]
Internet-Draft              WebTransport-H3                October 2023

  Session IDs are used to demultiplex streams and datagrams belonging
  to different WebTransport sessions.  On the wire, session IDs are
  encoded using the QUIC variable length integer scheme described in
  [RFC9000].

  The client MAY optimistically open unidirectional and bidirectional
  streams, as well as send datagrams, for a session that it has sent
  the CONNECT request for, even if it has not yet received the server's
  response to the request.  On the server side, opening streams and
  sending datagrams is possible as soon as the CONNECT request has been
  received.

  If at any point a session ID is received that cannot a valid ID for a
  client-initiated bidirectional stream, the recipient MUST close the
  connection with an H3_ID_ERROR error code.

4.1.  Unidirectional streams

  WebTransport endpoints can initiate unidirectional streams.  The
  HTTP/3 unidirectional stream type SHALL be 0x54.  The body of the
  stream SHALL be the stream type, followed by the session ID, encoded
  as a variable-length integer, followed by the user-specified stream
  data (Figure 1).

  Unidirectional Stream {
      Stream Type (i) = 0x54,
      Session ID (i),
      Stream Body (..)
  }

            Figure 1: Unidirectional WebTransport stream format

4.2.  Bidirectional Streams

  All client-initiated bidirectional streams are reserved by HTTP/3 as
  request streams, which are a sequence of HTTP/3 frames with a variety
  of rules; see Sections 4.1 and 6.1 of [HTTP3].

  WebTransport extends HTTP/3 to allow clients to declare and use
  alternative request stream rules.  Once a client receives settings
  indicating WebTransport support (Section 3.1), it can send a special
  signal value, encoded as a variable-length integer, as the first
  bytes of the stream in order to indicate how the remaining bytes on
  the stream are used.

  WebTransport extends HTTP/3 by defining rules for all server-
  initiated bidirectional streams.  Once a server receives settings
  indicating WebTransport support (Section 3.1), it can open a

draft-heinanen-diffserv-trtcm-00.txt