Internet-Draft | HTTP/3 and QPACK qlog event definitions | July 2023 |
Marx, et al. | Expires 11 January 2024 | [Page] |
This document describes concrete qlog event definitions and their metadata for HTTP/3 and QPACK-related events. These events can then be embedded in the higher level schema defined in [QLOG-MAIN].¶
Note to RFC editor: Please remove this section before publication.¶
Feedback and discussion are welcome at https://github.com/quicwg/qlog. Readers are advised to refer to the "editor's draft" at that URL for an up-to-date version of this document.¶
Concrete examples of integrations of this schema in various programming languages can be found at https://github.com/quiclog/qlog/.¶
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 11 January 2024.¶
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.¶
This document describes the values of the qlog name ("category" + "event") and "data" fields and their semantics for the HTTP/3 protocol [HTTP3], QPACK [QPACK], and some of their extensions (see [EXTENDED-CONNECT], [H3_PRIORITIZATION] and [H3-DATAGRAM]).¶
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.¶
The event and data structure definitions in ths document are expressed in the Concise Data Definition Language [CDDL] and its extensions described in [QLOG-MAIN].¶
The following fields from [QLOG-MAIN] are imported and used: name, category, type, data, group_id, protocol_type, importance, RawInfo, and time-related fields.¶
This document describes how the HTTP/3 and QPACK can be expressed in qlog using the schema defined in [QLOG-MAIN]. HTTP/3 and QPACK events are defined with a category, a name (the concatenation of "category" and "event"), an "importance", an optional "trigger", and "data" fields.¶
Some data fields use complex datastructures. These are represented as enums or re-usable definitions, which are grouped together on the bottom of this document for clarity.¶
When any event from this document is included in a qlog trace, the "protocol_type" qlog array field MUST contain an entry with the value "HTTP3".¶
The events described in this document can be used with or without logging the related QUIC events defined in [QLOG-QUIC]. If used with QUIC events, the QUIC document takes precedence in terms of recommended filenames and trace separation setups.¶
If used without QUIC events, it is recommended that the implementation assign a globally unique identifier to each HTTP/3 connection. This ID can then be used as the value of the qlog "group_id" field, as well as the qlog filename or file identifier, potentially suffixed by the vantagepoint type (For example, abcd1234_server.qlog would contain the server-side trace of the connection with GUID abcd1234).¶
This document defines events in two categories, written as lowercase to follow convention: h3 (Section 4) and qpack (Section 6).¶
As described in Section 3.4.2 of [QLOG-MAIN], the qlog "name" field is the concatenation of category and type.¶
Table 1 summarizes the name value of each event type that is defined in this specification.¶
Name value | Importance | Definition |
---|---|---|
h3:parameters_set | Base | Section 4.1 |
h3:parameters_restored | Base | Section 4.2 |
h3:stream_type_set | Base | Section 4.3 |
h3:priority_updated | Base | Section 4.4 |
h3:frame_created | Core | Section 4.5 |
h3:frame_parsed | Core | Section 4.6 |
h3:datagram_created | Base | Section 4.7 |
h3:datagram_parsed | Base | Section 4.8 |
h3:push_resolved | Extra | Section 4.9 |
qpack:state_updated | Base | Section 6.1 |
qpack:stream_state_updated | Core | Section 6.2 |
qpack:dynamic_table_updated | Extra | Section 6.3 |
qpack:headers_encoded | Base | Section 6.4 |
qpack:headers_decoded | Base | Section 6.5 |
qpack:instruction_created | Base | Section 6.6 |
qpack:instruction_parsed | Base | Section 6.7 |
HTTP/3 events extend the $ProtocolEventBody
extension point defined in [QLOG-MAIN].¶
HTTP events are logged when a certain condition happens at the application layer, and there isn't always a one to one mapping between HTTP and QUIC events. The exchange of data between the HTTP and QUIC layer is logged via the "stream_data_moved" and "datagram_data_moved" events in [QLOG-QUIC].¶
Importance: Base¶
This event contains HTTP/3 and QPACK-level settings, mostly those received from the HTTP/3 SETTINGS frame. All these parameters are typically set once and never change. However, they are typically set at different times during the connection, so there can be several instances of this event with different fields set.¶
The "owner" field reflects how Settings are exchanged on a connection. Sent settings have the value "local" and received settings have the value "received". A qlog can have multiple instances of this event.¶
As a reminder the CDDL unwrap operator (~), see [RFC8610]), copies the fields from the referenced type (H3Parameters) into the target type directly, extending the target with the unwrapped fields.¶
Definition:¶
This event can contain any number of unspecified fields. This allows for representation of reserved settings (aka GREASE) or ad-hoc support for extension settings that do not have a related qlog schema definition.¶
Importance: Base¶
When using QUIC 0-RTT, HTTP/3 clients are expected to remember and reuse the server's SETTINGs from the previous connection. This event is used to indicate which HTTP/3 settings were restored and to which values when utilizing 0-RTT.¶
Definition:¶
Similar to H3ParametersSet this event can contain any number of unspecified fields to allow for reserved or extension settings.¶
Importance: Base¶
Emitted when a stream's type becomes known. This is typically when a stream is opened and the stream's type indicator is sent or received.¶
The stream_type_value field is the numerical value without VLIE encoding.¶
Definition:¶
Importance: Base¶
Emitted when the priority of a request stream or push stream is initialized or updated through mechanisms defined in [RFC9218]. For example, the priority can be updated through signals received from client and/or server (e.g., in HTTP/3 HEADERS or PRIORITY_UPDATE frames) or it can be changed or overridden due to local policies.¶
Definition:¶
Importance: Core¶
This event is emitted when the HTTP/3 framing actually happens. This does not necessarily coincide with HTTP/3 data getting passed to the QUIC layer. For that, see the "stream_data_moved" event in [QLOG-QUIC].¶
Definition:¶
Importance: Core¶
This event is emitted when the HTTP/3 frame is parsed. This is not necessarily the same as when the HTTP/3 data is actually received on the QUIC layer. For that, see the "stream_data_moved" event in [QLOG-QUIC].¶
Definition:¶
HTTP/3 DATA frames can have arbitrarily large lengths to reduce frame header overhead. As such, DATA frames can span multiple QUIC packets. In this case, the frame_parsed event is emitted once for the frame header, and further streamed data is indicated using the stream_data_moved event.¶
Importance: Base¶
This event is emitted when an HTTP/3 Datagram is created (see [RFC9297]). This does not necessarily coincide with the HTTP/3 Datagram getting passed to the QUIC layer. For that, see the "datagram_data_moved" event in [QLOG-QUIC].¶
Definition:¶
Importance: Base¶
This event is emitted when the HTTP/3 Datagram is parsed (see [RFC9297]). This is not necessarily the same as when the HTTP/3 Datagram is actually received on the QUIC layer. For that, see the "datagram_data_moved" event in [QLOG-QUIC].¶
Definition:¶
Importance: Extra¶
This event is emitted when a pushed resource is successfully claimed (used) or, conversely, abandoned (rejected) by the application on top of HTTP/3 (e.g., the web browser). This event is added to help debug problems with unexpected PUSH behaviour, which is commonplace with HTTP/2.¶
Definition:¶
The following data field definitions can be used in HTTP/3 events.¶
The generic $H3Frame
is defined here as a CDDL extension point (a "socket"
or "plug"). It can be extended to support additional HTTP/3 frame types.¶
The HTTP/3 frame types defined in this document are as follows:¶
The generic $H3Datagram
is defined here as a CDDL extension point (a "socket"
or "plug"). It can be extended to support additional HTTP/3 datagram types. This
document intentionally does not define any specific HTTP/3 Datagram types.¶
This represents an uncompressed, plaintext HTTP Headers frame (e.g., no QPACK compression is applied).¶
For example:¶
The PRIORITY_UPDATE frame is defined in [RFC9218].¶
The frame_type_value field is the numerical value without VLIE encoding.¶
The H3ApplicationError defines the general $ApplicationError definition in the qlog QUIC definition, see [QLOG-QUIC].¶
; ensure HTTP errors are properly validate in QUIC events as well ; e.g., QUIC's ConnectionClose Frame $ApplicationError /= H3ApplicationError¶
QPACK events extend the $ProtocolEventBody
extension point defined in
[QLOG-MAIN].¶
QPACK events mainly serve as an aid to debug low-level QPACK issues.The higher-level, plaintext header values SHOULD (also) be logged in the http.frame_created and http.frame_parsed event data (instead).¶
QPACK does not have its own parameters_set event. This was merged with http.parameters_set for brevity, since qpack is a required extension for HTTP/3 anyway. Other HTTP/3 extensions MAY also log their SETTINGS fields in http.parameters_set or MAY define their own events.¶
Importance: Base¶
This event is emitted when one or more of the internal QPACK variables changes value. Note that some variables have two variations (one set locally, one requested by the remote peer). This is reflected in the "owner" field. As such, this field MUST be correct for all variables included a single event instance. If you need to log settings from two sides, you MUST emit two separate event instances.¶
Definition:¶
Importance: Core¶
This event is emitted when a stream becomes blocked or unblocked by header decoding requests or QPACK instructions.¶
This event is of "Core" importance, as it might have a large impact on HTTP/3's observed performance.¶
Definition:¶
Importance: Extra¶
This event is emitted when one or more entries are inserted or evicted from QPACK's dynamic table.¶
Definition:¶
Importance: Base¶
This event is emitted when an uncompressed header block is encoded successfully.¶
This event has overlap with http.frame_created for the HeadersFrame type. When outputting both events, implementers MAY omit the "headers" field in this event.¶
Definition:¶
Importance: Base¶
This event is emitted when a compressed header block is decoded successfully.¶
This event has overlap with http.frame_parsed for the HeadersFrame type. When outputting both events, implementers MAY omit the "headers" field in this event.¶
Definition:¶
Importance: Base¶
This event is emitted when a QPACK instruction (both decoder and encoder) is created and added to the encoder/decoder stream.¶
Definition:¶
Encoder/decoder semantics and stream_id's are implicit in either the instruction types or can be logged via other events (e.g., http.stream_type_set)¶
Importance: Base¶
This event is emitted when a QPACK instruction (both decoder and encoder) is read from the encoder/decoder stream.¶
Definition:¶
Encoder/decoder semantics and stream_id's are implicit in either the instruction types or can be logged via other events (e.g., http.stream_type_set)¶
The following data field definitions can be used in QPACK events.¶
The instructions do not have explicit encoder/decoder types, since there is no overlap between the instructions of both types in neither name nor function.¶
This is also used for "indexed header field with post-base index"¶
This is also used for "Literal header field with post-base name reference".¶
The security and privacy considerations discussed in [QLOG-MAIN] apply to this document as well.¶
Major changes:¶
Smaller changes:¶
Much of the initial work by Robin Marx was done at the Hasselt and KU Leuven Universities.¶
Thanks to Jana Iyengar, Brian Trammell, Dmitri Tikhonov, Stephen Petrides, Jari Arkko, Marcus Ihlar, Victor Vasiliev, Mirja Kuehlewind, Jeremy Laine, Kazu Yamamoto, and Christian Huitema for their feedback and suggestions.¶