<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.26 (Ruby 2.7.4) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-pardue-httpbis-priority-order-00" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.16.0 -->
  <front>
    <title abbrev="HTTP priority order">HTTP priority order extension</title>
    <seriesInfo name="Internet-Draft" value="draft-pardue-httpbis-priority-order-00"/>
    <author fullname="Lucas Pardue">
      <organization>Cloudflare</organization>
      <address>
        <email>lucaspardue.24.7@gmail.com</email>
      </address>
    </author>
    <date year="2023" month="March" day="26"/>
    <area>Applications and Real-Time</area>
    <workgroup>HTTP</workgroup>
    <keyword>next generation</keyword>
    <keyword>unicorn</keyword>
    <keyword>sparkling distributed ledger</keyword>
    <abstract>
      <t>The send-order parameter for the HTTP extensible prioritization scheme allows
explicit ordering indication independent of request order. This can be used to
as an additional input signal to scheduling decisions, to support alternative
sending behaviors.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://LPardue.github.io/draft-pardue-httpbis-priority-order/draft-pardue-httpbis-priority-order.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-pardue-httpbis-priority-order/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        HTTP Working Group mailing list (<eref target="mailto:ietf-http-wg@w3.org"/>),
        which is archived at <eref target="https://lists.w3.org/Archives/Public/ietf-http-wg/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/LPardue/draft-pardue-httpbis-priority-order"/>.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>The extensible prioritization scheme for HTTP provides guidance for servers
using priority signals to schedule the sending of stream data; <xref section="10" sectionFormat="of" target="RFC9218"/>. It recommends that when there are multiple items with the same
urgency servers choose how to allocate bandwidth by considering the stream
ID and incremental parameter, and possibly other signals.</t>
      <t>In web use cases, an HTML document can include other resources and user agents
tend to issue requests in an ordered sequence that matches the actions of HTML
or HTTP receiver processing. Requests are made using ascending stream IDs where
lower-numbered streams typically relate to objects that were discovered earlier
than higher-numbered streams. Because stream IDs represent an ordering that
closely matches the receiver processing needs, the scheduling guidance in
<xref target="RFC9218"/> can be effectively used to send data that is optimal for this
consumption pattern. As a simple example, a client that issues non-incremental
requests of the same urgency on streams 0, 4, 8 and 12 would expect a server ,
that is following <xref section="10" sectionFormat="of" target="RFC9218"/>, to serve the response in the order
0, 4, 8 and 12.</t>
      <t>A strictly singular serving order is unlikely to meet the needs of HTTP-based
applications. The urgency and incremental parameters augment stream ID, urgency
allows more important resources (from a processing perspective) to be sent ahead
of less important resources, while incremental streams share bandwidth among
resources that can be effectively loaded in parallel.</t>
      <t>There are other use cases where the user agent may not be able to influence the
order of request emission in the most optimal sequence, or may discover an
important resource late on and would like the response to "jump the queue" of
other streams within a single urgency level. The send-order parameter defined by
this document can be used in these situations. While it might be possible to
achieve a similar outcome by careful use of the urgency parameter, such as
reserving an urgency level, the limited number of levels can make this approach
difficult in practice. Alternatively, rebalancing or reprioritization of
concurrent stream urgencies might also achieve these goals but encounters issues
related to churn and responsiveness due to the latency of reprioritization
signals.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" 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>
      <t>This document uses the following terminology from <xref section="3" sectionFormat="of" target="STRUCTURED-FIELDS"/> to specify syntax and parsing: Boolean, Dictionary,
and Integer.</t>
      <t>Example HTTP requests and responses use the HTTP/2-style formatting from
<xref target="RFC9113"/>.</t>
      <t>This document uses the variable-length integer encoding from
<xref target="QUIC"/>.</t>
    </section>
    <section anchor="the-send-order-parameter">
      <name>The send-order parameter</name>
      <t>The send-order (<tt>bikeshed-order-name</tt>) parameter value is Integer (see <xref section="3.3.1" sectionFormat="of" target="STRUCTURED-FIELDS"/>), between 0 and 2<sup>32</sup>. The range is
ascending, higher values have precedence over lower values.</t>
      <t>Endpoints use send-order to communicate an ordering precedence that is
independent of the request order. There is no default value, omission of the
parameter means that there is no additional ordering preference.</t>
      <t>The send-order parameter satisfies the urgency and incremental parameter
compatibility requirements in <xref section="4.3" sectionFormat="of" target="RFC9218"/>.</t>
      <t>The following example shows an HTTP/3 client issuing multiple requests on the
same connection, without the send-order parameter, and responses sent by a
server following the guidance in <xref section="10" sectionFormat="of" target="RFC9218"/>.</t>
      <artwork><![CDATA[
Client                              Server

HEADERS (stream 0)
  :method = GET
  :scheme = https
  :authority = example.net
  :path = /image1.jpg
  priority = u=1

HEADERS (stream 4)
  :method = GET
  :scheme = https
  :authority = example.net
  :path = /image2.jpg
  priority = u=1

HEADERS (stream 8)
  :method = GET
  :scheme = https
  :authority = example.net
  :path = /image3.jpg
  priority = u=1

                                  HEADERS (stream 0)
                                    :status = 200
                                    content-type = image/jpeg

                                  DATA (stream 0)
                                    {binary data}

                                  HEADERS (stream 4)
                                    :status = 200
                                    content-type = image/jpeg

                                  DATA (stream 4)
                                    {binary data}

                                  HEADERS (stream 8)
                                    :status = 200
                                    content-type = image/jpeg

                                  DATA (stream 8)
                                    {binary data}
]]></artwork>
      <t>The following example shows an HTTP/3 client issuing multiple requests on the
same connection, without the send-order parameter, and responses sent by a
server following the guidance in <xref target="server-scheduling"/>.</t>
      <artwork><![CDATA[
Client                              Server

HEADERS (stream 0)
  :method = GET
  :scheme = https
  :authority = example.net
  :path = /image1.jpg
  priority = u=1

HEADERS (stream 4)
  :method = GET
  :scheme = https
  :authority = example.net
  :path = /image2.jpg
  priority = u=1,bikeshed-order-name=25

HEADERS (stream 8)
  :method = GET
  :scheme = https
  :authority = example.net
  :path = /image3.jpg
  priority = u=1,bikeshed-order-name=15

                                  HEADERS (stream 4)
                                    :status = 200
                                    content-type = image/jpeg

                                  DATA (stream 4)
                                    {binary data}

                                  HEADERS (stream 8)
                                    :status = 200
                                    content-type = image/jpeg

                                  DATA (stream 8)
                                    {binary data}

                                  HEADERS (stream 0)
                                    :status = 200
                                    content-type = image/jpeg

                                  DATA (stream 0)
                                    {binary data}
]]></artwork>
    </section>
    <section anchor="server-scheduling">
      <name>Server Scheduling</name>
      <t>This document updates the scheduling guidance in <xref section="10" sectionFormat="of" target="RFC9218"/>.</t>
      <t>Non-incremental responses of the same urgency <bcp14>SHOULD</bcp14> be served by prioritizing
bandwidth allocation in ascending order of send-order. If there are no responses
with a send-order, allocation <bcp14>SHOULD</bcp14> use ascending order of stream ID.</t>
      <t>Incremental responses of the same urgency are not affected by send-order.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>The considerations in <xref target="RFC9218"/> apply. There are not believed to be any
additional considerations.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>TODO</t>
    </section>
  </middle>
  <back>
    <displayreference target="RFC9113" to="HTTP/2"/>
    <references>
      <name>Normative References</name>
      <reference anchor="RFC9113">
        <front>
          <title>HTTP/2</title>
          <author fullname="M. Thomson" initials="M." role="editor" surname="Thomson">
            <organization/>
          </author>
          <author fullname="C. Benfield" initials="C." role="editor" surname="Benfield">
            <organization/>
          </author>
          <date month="June" year="2022"/>
          <abstract>
            <t>This specification describes an optimized expression of the semantics of the Hypertext Transfer Protocol (HTTP), referred to as HTTP version 2 (HTTP/2). HTTP/2 enables a more efficient use of network resources and a reduced latency by introducing field compression and allowing multiple concurrent exchanges on the same connection.</t>
            <t>This document obsoletes RFCs 7540 and 8740.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="9113"/>
        <seriesInfo name="DOI" value="10.17487/RFC9113"/>
      </reference>
      <reference anchor="RFC9218">
        <front>
          <title>Extensible Prioritization Scheme for HTTP</title>
          <author fullname="K. Oku" initials="K." surname="Oku">
            <organization/>
          </author>
          <author fullname="L. Pardue" initials="L." surname="Pardue">
            <organization/>
          </author>
          <date month="June" year="2022"/>
          <abstract>
            <t>This document describes a scheme that allows an HTTP client to communicate its preferences for how the upstream server prioritizes responses to its requests, and also allows a server to hint to a downstream intermediary how its responses should be prioritized when they are forwarded.  This document defines the Priority header field for communicating the initial priority in an HTTP version-independent manner, as well as HTTP/2 and HTTP/3 frames for reprioritizing responses. These share a common format structure that is designed to provide future extensibility.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="9218"/>
        <seriesInfo name="DOI" value="10.17487/RFC9218"/>
      </reference>
      <reference anchor="RFC2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner">
            <organization/>
          </author>
          <date month="March" year="1997"/>
          <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">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba">
            <organization/>
          </author>
          <date month="May" year="2017"/>
          <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>
      <reference anchor="STRUCTURED-FIELDS">
        <front>
          <title>Structured Field Values for HTTP</title>
          <author fullname="M. Nottingham" initials="M." surname="Nottingham">
            <organization/>
          </author>
          <author fullname="P-H. Kamp" initials="P-H." surname="Kamp">
            <organization/>
          </author>
          <date month="February" year="2021"/>
          <abstract>
            <t>This document describes a set of data types and associated algorithms that are intended to make it easier and safer to define and handle HTTP header and trailer fields, known as "Structured Fields", "Structured Headers", or "Structured Trailers". It is intended for use by specifications of new HTTP fields that wish to use a common syntax that is more restrictive than traditional HTTP field values.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8941"/>
        <seriesInfo name="DOI" value="10.17487/RFC8941"/>
      </reference>
      <reference anchor="QUIC">
        <front>
          <title>QUIC: A UDP-Based Multiplexed and Secure Transport</title>
          <author fullname="J. Iyengar" initials="J." role="editor" surname="Iyengar">
            <organization/>
          </author>
          <author fullname="M. Thomson" initials="M." role="editor" surname="Thomson">
            <organization/>
          </author>
          <date month="May" year="2021"/>
          <abstract>
            <t>This document defines the core of the QUIC transport protocol.  QUIC provides applications with flow-controlled streams for structured communication, low-latency connection establishment, and network path migration. QUIC includes security measures that ensure confidentiality, integrity, and availability in a range of deployment circumstances.  Accompanying documents describe the integration of TLS for key negotiation, loss detection, and an exemplary congestion control algorithm.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="9000"/>
        <seriesInfo name="DOI" value="10.17487/RFC9000"/>
      </reference>
    </references>
    <section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>TODO acknowledge.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H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