| draft-kazuho-httpbis-priority-03.txt | draft-kazuho-httpbis-priority-04.txt | |||
|---|---|---|---|---|
| HTTP K. Oku | HTTP K. Oku | |||
| Internet-Draft Fastly | Internet-Draft Fastly | |||
| Intended status: Standards Track L. Pardue | Intended status: Standards Track L. Pardue | |||
| Expires: May 8, 2020 Cloudflare | Expires: May 23, 2020 Cloudflare | |||
| November 05, 2019 | November 20, 2019 | |||
| Extensible Prioritization Scheme for HTTP | Extensible Prioritization Scheme for HTTP | |||
| draft-kazuho-httpbis-priority-03 | draft-kazuho-httpbis-priority-04 | |||
| Abstract | Abstract | |||
| This document describes a scheme for prioritizing HTTP responses. | This document describes a scheme for prioritizing HTTP responses. | |||
| This scheme expresses the priority of each HTTP response using | This scheme expresses the priority of each HTTP response using | |||
| absolute values, rather than as a relative relationship between a | absolute values, rather than as a relative relationship between a | |||
| group of HTTP responses. | group of HTTP responses. | |||
| This document defines the Priority header field for communicating the | This document defines the Priority header field for communicating the | |||
| initial priority in an HTTP version-independent manner, as well as | initial priority in an HTTP version-independent manner, as well as | |||
| skipping to change at page 1, line 40 ¶ | skipping to change at page 1, line 40 ¶ | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
| working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
| Drafts is at https://datatracker.ietf.org/drafts/current/. | Drafts is at https://datatracker.ietf.org/drafts/current/. | |||
| Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| This Internet-Draft will expire on May 8, 2020. | This Internet-Draft will expire on May 23, 2020. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2019 IETF Trust and the persons identified as the | Copyright (c) 2019 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
| (https://trustee.ietf.org/license-info) in effect on the date of | (https://trustee.ietf.org/license-info) in effect on the date of | |||
| publication of this document. Please review these documents | publication of this document. Please review these documents | |||
| skipping to change at page 2, line 16 ¶ | skipping to change at page 2, line 16 ¶ | |||
| to this document. Code Components extracted from this document must | to this document. Code Components extracted from this document must | |||
| include Simplified BSD License text as described in Section 4.e of | include Simplified BSD License text as described in Section 4.e of | |||
| the Trust Legal Provisions and are provided without warranty as | the Trust Legal Provisions and are provided without warranty as | |||
| described in the Simplified BSD License. | described in the Simplified BSD License. | |||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
| 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 | 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 | |||
| 2. Motivation for Replacing HTTP/2 Priorities . . . . . . . . . 4 | 2. Motivation for Replacing HTTP/2 Priorities . . . . . . . . . 4 | |||
| 3. Negotiating Priorities . . . . . . . . . . . . . . . . . . . 5 | 2.1. Disabling HTTP/2 Priorities . . . . . . . . . . . . . . . 5 | |||
| 3.1. The SETTINGS_PRIORITIES SETTINGS Parameter . . . . . . . 5 | 3. Priority Parameters . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 3.2. Defined Prioritization Scheme Values . . . . . . . . . . 6 | 3.1. urgency . . . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 3.2.1. H2_TREE . . . . . . . . . . . . . . . . . . . . . . . 6 | 3.1.1. prerequisite . . . . . . . . . . . . . . . . . . . . 7 | |||
| 3.2.2. URGENCY . . . . . . . . . . . . . . . . . . . . . . . 7 | 3.1.2. default . . . . . . . . . . . . . . . . . . . . . . . 7 | |||
| 4. The Priority HTTP Header Field . . . . . . . . . . . . . . . 7 | 3.1.3. supplementary . . . . . . . . . . . . . . . . . . . . 7 | |||
| 4.1. urgency . . . . . . . . . . . . . . . . . . . . . . . . . 7 | 3.1.4. background . . . . . . . . . . . . . . . . . . . . . 8 | |||
| 4.1.1. prerequisite . . . . . . . . . . . . . . . . . . . . 8 | 3.2. incremental . . . . . . . . . . . . . . . . . . . . . . . 8 | |||
| 4.1.2. default . . . . . . . . . . . . . . . . . . . . . . . 8 | 3.3. Defining New Parameters . . . . . . . . . . . . . . . . . 9 | |||
| 4.1.3. supplementary . . . . . . . . . . . . . . . . . . . . 8 | 4. The Priority HTTP Header Field . . . . . . . . . . . . . . . 9 | |||
| 4.1.4. background . . . . . . . . . . . . . . . . . . . . . 9 | 5. Reprioritization . . . . . . . . . . . . . . . . . . . . . . 9 | |||
| 4.2. progressive . . . . . . . . . . . . . . . . . . . . . . . 9 | 5.1. HTTP/2 PRIORITY_UPDATE Frame . . . . . . . . . . . . . . 10 | |||
| 5. Reprioritization . . . . . . . . . . . . . . . . . . . . . . 10 | ||||
| 5.1. HTTP/2 PRIORITY_UPDATE Frame . . . . . . . . . . . . . . 11 | ||||
| 5.2. HTTP/3 PRIORITY_UPDATE Frame . . . . . . . . . . . . . . 11 | 5.2. HTTP/3 PRIORITY_UPDATE Frame . . . . . . . . . . . . . . 11 | |||
| 6. Merging Client- and Server-Driven Parameters . . . . . . . . 12 | 6. Merging Client- and Server-Driven Parameters . . . . . . . . 12 | |||
| 7. Security Considerations . . . . . . . . . . . . . . . . . . . 13 | 7. Security Considerations . . . . . . . . . . . . . . . . . . . 13 | |||
| 7.1. Fairness and Coalescing Intermediaries . . . . . . . . . 13 | 7.1. Fairness . . . . . . . . . . . . . . . . . . . . . . . . 13 | |||
| 8. Considerations . . . . . . . . . . . . . . . . . . . . . . . 14 | 7.1.1. Coalescing Intermediaries . . . . . . . . . . . . . . 13 | |||
| 8.1. Why use an End-to-End Header Field? . . . . . . . . . . . 14 | 7.1.2. HTTP/1.x Back Ends . . . . . . . . . . . . . . . . . 14 | |||
| 8.2. Why do Urgencies Have Meanings? . . . . . . . . . . . . . 14 | 7.1.3. Intentional Introduction of Unfairness . . . . . . . 15 | |||
| 8.3. Can an Intermediary Send its own Signal? . . . . . . . . 15 | 8. Considerations . . . . . . . . . . . . . . . . . . . . . . . 15 | |||
| 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 | 8.1. Why use an End-to-End Header Field? . . . . . . . . . . . 15 | |||
| 9.1. HTTP Prioritization Scheme Registry . . . . . . . . . . . 16 | 8.2. Why do Urgencies Have Meanings? . . . . . . . . . . . . . 15 | |||
| 8.3. Can an Intermediary Send its own Signal? . . . . . . . . 16 | ||||
| 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 | ||||
| 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 17 | 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 17 | |||
| 10.1. Normative References . . . . . . . . . . . . . . . . . . 17 | 10.1. Normative References . . . . . . . . . . . . . . . . . . 17 | |||
| 10.2. Informative References . . . . . . . . . . . . . . . . . 18 | 10.2. Informative References . . . . . . . . . . . . . . . . . 18 | |||
| Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 18 | Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 19 | |||
| Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 19 | Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 19 | |||
| B.1. Since draft-kazuho-httpbis-priority-02 . . . . . . . . . 19 | B.1. Since draft-kazuho-httpbis-priority-03 . . . . . . . . . 20 | |||
| B.2. Since draft-kazuho-httpbis-priority-01 . . . . . . . . . 19 | B.2. Since draft-kazuho-httpbis-priority-02 . . . . . . . . . 20 | |||
| B.3. Since draft-kazuho-httpbis-priority-00 . . . . . . . . . 19 | B.3. Since draft-kazuho-httpbis-priority-01 . . . . . . . . . 20 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 19 | B.4. Since draft-kazuho-httpbis-priority-00 . . . . . . . . . 20 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 20 | ||||
| 1. Introduction | 1. Introduction | |||
| It is common for an HTTP ([RFC7230]) resource representation to have | It is common for an HTTP ([RFC7230]) resource representation to have | |||
| relationships to one or more other resources. Clients will often | relationships to one or more other resources. Clients will often | |||
| discover these relationships while processing a retrieved | discover these relationships while processing a retrieved | |||
| representation, leading to further retrieval requests. Meanwhile, | representation, leading to further retrieval requests. Meanwhile, | |||
| the nature of the relationship determines whether the client is | the nature of the relationship determines whether the client is | |||
| blocked from continuing to process locally available resources. For | blocked from continuing to process locally available resources. For | |||
| example, visual rendering of an HTML document could be blocked by the | example, visual rendering of an HTML document could be blocked by the | |||
| retrieval of a CSS file that the document refers to. In contrast, | retrieval of a CSS file that the document refers to. In contrast, | |||
| inline images do not block rendering and get drawn progressively as | inline images do not block rendering and get drawn incrementally as | |||
| the chunks of the images arrive. | the chunks of the images arrive. | |||
| To provide meaningful representation of a document at the earliest | To provide meaningful representation of a document at the earliest | |||
| moment, it is important for an HTTP server to prioritize the HTTP | moment, it is important for an HTTP server to prioritize the HTTP | |||
| responses, or the chunks of those HTTP responses, that it sends. | responses, or the chunks of those HTTP responses, that it sends. | |||
| HTTP/2 ([RFC7540]) provides such a prioritization scheme. A client | HTTP/2 ([RFC7540]) provides such a prioritization scheme. A client | |||
| sends a series of PRIORITY frames to communicate to the server a | sends a series of PRIORITY frames to communicate to the server a | |||
| "priority tree"; this represents the client's preferred ordering and | "priority tree"; this represents the client's preferred ordering and | |||
| weighted distribution of the bandwidth among the HTTP responses. | weighted distribution of the bandwidth among the HTTP responses. | |||
| skipping to change at page 5, line 15 ¶ | skipping to change at page 5, line 15 ¶ | |||
| [I-D.ietf-quic-http] without changing the signal and its processing. | [I-D.ietf-quic-http] without changing the signal and its processing. | |||
| Considering the problems with deployment and adaptability to HTTP/3, | Considering the problems with deployment and adaptability to HTTP/3, | |||
| retaining the HTTP/2 priority scheme increases the complexity of the | retaining the HTTP/2 priority scheme increases the complexity of the | |||
| entire system without any evidence that the value it provides offsets | entire system without any evidence that the value it provides offsets | |||
| that complexity. In fact, multiple experiments from independent | that complexity. In fact, multiple experiments from independent | |||
| research have shown that simpler schemes can reach at least | research have shown that simpler schemes can reach at least | |||
| equivalent performance characteristics compared to the more complex | equivalent performance characteristics compared to the more complex | |||
| HTTP/2 setups seen in practice, at least for the web use case. | HTTP/2 setups seen in practice, at least for the web use case. | |||
| The problems and insights laid out above are motivation for the | 2.1. Disabling HTTP/2 Priorities | |||
| alternative and more straightforward prioritization scheme presented | ||||
| in this document. In order to support deployment of new schemes, a | ||||
| general-purpose negotiation mechanism is specified in Section 3. | ||||
| 3. Negotiating Priorities | ||||
| The document specifies a negotiation mechanism that allows each peer | ||||
| to communicate which, if any, priority schemes are supported, as well | ||||
| as the server's ranked preference. | ||||
| For both HTTP/2 and HTTP/3, either peer's SETTINGS may arrive first, | ||||
| so any negotiation must be unilateral and not rely upon receiving the | ||||
| peer's SETTINGS value. | ||||
| Servers are likely to only use one prioritization scheme at once per | ||||
| each connection, and may be unable to change the scheme once | ||||
| established, so the setting MUST be sent prior to the first request | ||||
| if it is ever sent. In HTTP/3, SETTINGS might arrive after the first | ||||
| request even if they are sent first. Therefore, future | ||||
| specifications that define alternative prioritization schemes for | ||||
| HTTP/3 SHOULD define how the server would act when it receives a | ||||
| stream-level priority signal prior to receiving the SETTINGS frame. | ||||
| 3.1. The SETTINGS_PRIORITIES SETTINGS Parameter | ||||
| This document defines a new SETTINGS_PRIORITIES parameter (0x9) for | ||||
| HTTP/2 and HTTP/3, which allows both peers to indicate which | ||||
| prioritization schemes they support. The value of this parameter is | ||||
| interpreted in two ways depending on if it is zero or non-zero. | ||||
| If the setting has a value of zero it indicates no support for | ||||
| priorities. If either side sends the parameter with a value of zero, | ||||
| clients SHOULD NOT send hop-by-hop priority signals (e.g., HTTP/2 | ||||
| PRIORITY frame) and servers SHOULD NOT make any assumptions based on | ||||
| the presence or lack thereof of such signals. | ||||
| If the value is non-zero, then it is interpreted as an ordered | ||||
| preference list of prioritization schemes represented by 8-bit | ||||
| values. The least significant 8 bits indicate the sender's most | ||||
| preferred priority scheme, the second least significant 8 bits | ||||
| indicate the sender's second choice, and so on. This allows | ||||
| expressing support for 4 schemes in HTTP/2 and 7 in HTTP/3. | ||||
| A sender MUST comply with the following restrictions when | ||||
| constructing a preference list: duplicate 8-bit values (excluding the | ||||
| value 0) MUST NOT be used, and if any byte is 0 then all more | ||||
| significant bytes MUST also be 0. An endpoint that receives a | ||||
| setting in violation of these requirements MUST treat it as a | ||||
| connection error of type PROTOCOL_ERROR for HTTP/2 [RFC7540], or of | ||||
| type H3_SETTINGS_ERROR for HTTP/3 [I-D.ietf-quic-http]. | ||||
| In HTTP/2, the setting SHOULD appear in the first SETTINGS frame and | ||||
| peers MUST NOT process the setting if it is received multiple times | ||||
| in order to avoid changing the agreed upon prioritization scheme. | ||||
| If there is a prioritization scheme supported by both the client and | ||||
| server, then the server's preference order prevails and both peers | ||||
| SHOULD only use the agreed upon priority scheme for the remainder of | ||||
| the session. The server chooses because it is in the best position | ||||
| to know what information from the client is of the most value. | ||||
| Once the negotiation is complete, endpoints MAY stop sending hop-by- | ||||
| hop prioritization signals that were not negotiated in order to | ||||
| conserve bandwidth. However, endpoints SHOULD continue sending end- | ||||
| to-end signals (e.g., the Priority header field), as that might have | ||||
| meaningful effect to other nodes that handle the HTTP message. | ||||
| 3.2. Defined Prioritization Scheme Values | ||||
| This document defines two prioritization scheme values for use with | The problems and insights set out above are motivation for allowing | |||
| the SETTINGS_PRIORITIES setting. | endpoints to opt out of using the HTTP/2 priority scheme, in favor of | |||
| using an alternative such as the scheme defined in this | ||||
| specification. The SETTINGS_DEPRECATE_HTTP2_PRIORITIES setting | ||||
| described below enables endpoints to understand their peer's | ||||
| intention. The value of the parameter MUST be 0 or 1. Any value | ||||
| other than 0 or 1 MUST be treated as a connection error (see | ||||
| [RFC7540]; Section 5.4.1) of type PROTOCOL_ERROR. | ||||
| 3.2.1. H2_TREE | Endpoints MUST send this SETTINGS parameter as part of the first | |||
| SETTINGS frame. When the peer receives the first SETTINGS frame, it | ||||
| learns the sender has deprecated the HTTP/2 priority scheme if it | ||||
| receives the SETTINGS_DEPRECATE_HTTP2_PRIORITIES parameter with the | ||||
| value of 1. | ||||
| This document defines the priority scheme identifier H2_TREE (8-bit | A sender MUST NOT change the SETTINGS_DEPRECATE_HTTP2_PRIORITIES | |||
| value of 1) that indicates support for HTTP/2-style priorities | parameter value after the first SETTINGS frame. Detection of a | |||
| ([RFC7540], Section 5.3). | change by a receiver MUST be treated as a connection error of type | |||
| PROTOCOL_ERROR. | ||||
| The H2_TREE priority scheme identifier MUST NOT be be sent in an | Until the client receives the SETTINGS frame from the server, the | |||
| HTTP/3 settings because there is no defined mapping of this scheme. | client SHOULD send both the priority signal defined in the HTTP/2 | |||
| Endpoints MUST treat receipt of H2_TREE as a connection error of type | priority scheme and also that of this prioritization scheme. Once | |||
| H3_SETTINGS_ERROR. | the client learns that the HTTP/2 priority scheme is deprecated, it | |||
| SHOULD stop sending the HTTP/2 priority signals. If the client | ||||
| learns that the HTTP/2 priority scheme is not deprecated, it SHOULD | ||||
| stop sending PRIORITY_UPDATE frames, but MAY continue sending the | ||||
| Priority header field, as it is an end-to-end signal that might be | ||||
| useful to nodes behind the server that the client is directly | ||||
| connected to. | ||||
| 3.2.2. URGENCY | The SETTINGS frame precedes any priority signal sent from a client in | |||
| HTTP/2, so a server can determine if it should respect the HTTP/2 | ||||
| scheme before building state. | ||||
| This document defines the priority scheme identifier URGENCY (8-bit | 3. Priority Parameters | |||
| value of 2) that indicates support for the extensible priority scheme | ||||
| defined in the present document. | ||||
| An intermediary connecting to a backend server SHOULD declare support | The priority information is a sequence of key-value pairs, providing | |||
| for the extensible priority scheme when and only when all the | room for future extensions. Each key-value pair represents a | |||
| requests that are to be sent on that backend connection originates | priority parameter. | |||
| from one client-side connection that has negotiated the use of the | ||||
| extensible priority scheme (see Section 7.1). | ||||
| 4. The Priority HTTP Header Field | The Priority HTTP header field is an end-to-end way to transmit this | |||
| set of parameters when a request or a response is issued. In order | ||||
| to reprioritize a request, HTTP-version-specific frames are used by | ||||
| clients to transmit the same information on a single hop. If | ||||
| intermediaries want to specify prioritizaton on a multiplexed HTTP | ||||
| connection, it SHOULD use a PRIORITY_UPDATE frame and SHOULD NOT | ||||
| change the Priority header field. | ||||
| The Priority HTTP header field can appear in requests and responses. | In both cases, the set of priority parameters is encoded as a | |||
| A client uses it to specify the priority of the response. A server | Structured Headers Dictionary ([STRUCTURED-HEADERS]). | |||
| uses it to inform the client that the priority was overwritten. An | ||||
| intermediary can use the Priority information from client requests | ||||
| and server responses to correct or amend the precedence to suit it | ||||
| (see Section 6). | ||||
| The value of the Priority header field is a Structured Headers | This document defines the urgency("u") and incremental("i") | |||
| Dictionary ([STRUCTURED-HEADERS]). Each dictionary member represents | parameters. When used, these parameters MUST be accompanied by | |||
| a parameter of the Priority header field. This document defines the | values. When any of the defined parameters are omitted, or if the | |||
| "urgency" and "progressive" parameters. Values of these parameters | Priority header field is not used, their default values SHOULD be | |||
| MUST always be present. When any of the defined parameters are | applied. | |||
| omitted, or if the Priority header field is not used, their default | ||||
| values SHOULD be applied. | ||||
| Unknown parameters MUST be ignored. | Unknown parameters, parameters with out-of-range values or values of | |||
| unexpected types MUST be ignored. | ||||
| 4.1. urgency | 3.1. urgency | |||
| The "urgency" parameter takes an integer between -1 and 6 as shown | The urgency("u") parameter takes an integer between 0 and 7, in | |||
| below: | descending order of priority, as shown below: | |||
| +-----------------+-------------------------------+ | +-----------------+-------------------------------+ | |||
| | Urgency | Definition | | | Urgency | Definition | | |||
| +-----------------+-------------------------------+ | +-----------------+-------------------------------+ | |||
| | -1 | prerequisite (Section 4.1.1) | | | 0 | prerequisite (Section 3.1.1) | | |||
| | 0 | default (Section 4.1.2) | | | 1 | default (Section 3.1.2) | | |||
| | between 1 and 5 | supplementary (Section 4.1.3) | | | between 2 and 6 | supplementary (Section 3.1.3) | | |||
| | 6 | background (Section 4.1.4) | | | 7 | background (Section 3.1.4) | | |||
| +-----------------+-------------------------------+ | +-----------------+-------------------------------+ | |||
| Table 1: Urgencies | Table 1: Urgencies | |||
| The value is encoded as an sh-integer. The default value is zero. | The value is encoded as an sh-integer. The default value is 1. | |||
| A server SHOULD transmit HTTP responses in the order of their urgency | A server SHOULD transmit HTTP responses in the order of their urgency | |||
| values. The lower the value, the higher the precedence. | values. The lower the value, the higher the precedence. | |||
| The following example shows a request for a CSS file with the urgency | The following example shows a request for a CSS file with the urgency | |||
| set to "-1": | set to "0": | |||
| :method = GET | :method = GET | |||
| :scheme = https | :scheme = https | |||
| :authority = example.net | :authority = example.net | |||
| :path = /style.css | :path = /style.css | |||
| priority = urgency=-1 | priority = u=0 | |||
| The definition of the urgencies and their expected use-case are | The definition of the urgencies and their expected use-case are | |||
| described below. Endpoints SHOULD respect the definition of the | described below. Endpoints SHOULD respect the definition of the | |||
| values when assigning urgencies. | values when assigning urgencies. | |||
| 4.1.1. prerequisite | 3.1.1. prerequisite | |||
| The prerequisite urgency (value -1) indicates that the response | The prerequisite urgency (value 0) indicates that the response | |||
| prevents other responses with an urgency of prerequisite or default | prevents other responses with an urgency of prerequisite or default | |||
| from being used. | from being used until it is fully transmitted. | |||
| For example, use of an external stylesheet can block a web browser | For example, use of an external stylesheet can block a web browser | |||
| from rendering the HTML. In such case, the stylesheet is given the | from rendering the HTML. In such case, the stylesheet is given the | |||
| prerequisite urgency. | prerequisite urgency. | |||
| 4.1.2. default | 3.1.2. default | |||
| The default urgency (value 0) indicates a response that is to be used | The default urgency (value 1) indicates a response that is to be used | |||
| as it is delivered to the client, but one that does not block other | as it is delivered to the client, but one that does not block other | |||
| responses from being used. | responses from being used. | |||
| For example, when a user using a web browser navigates to a new HTML | For example, when a user using a web browser navigates to a new HTML | |||
| document, the request for that HTML is given the default urgency. | document, the request for that HTML is given the default urgency. | |||
| When that HTML document uses a custom font, the request for that | When that HTML document uses a custom font, the request for that | |||
| custom font SHOULD also be given the default urgency. This is | custom font SHOULD also be given the default urgency. This is | |||
| because the availability of the custom font is likely a precondition | because the availability of the custom font is likely a precondition | |||
| for the user to use that portion of the HTML document, which is to be | for the user to use that portion of the HTML document, which is to be | |||
| rendered by that font. | rendered by that font. | |||
| 4.1.3. supplementary | 3.1.3. supplementary | |||
| The supplementary urgency indicates a response that is helpful to the | The supplementary urgencies (values 2 to 6) indicate a response that | |||
| client using a composition of responses, even though the response | is helpful to the client using a composition of responses, even | |||
| itself is not mandatory for using those responses. | though the response itself is not mandatory for using those | |||
| responses. | ||||
| For example, inline images (i.e., images being fetched and displayed | For example, inline images (i.e., images being fetched and displayed | |||
| as part of the document) are visually important elements of an HTML | as part of the document) are visually important elements of an HTML | |||
| document. As such, users will typically not be prevented from using | document. As such, users will typically not be prevented from using | |||
| the document, at least to some degree, before any or all of these | the document, at least to some degree, before any or all of these | |||
| images are loaded. Display of those images are thus considered to be | images are loaded. Display of those images are thus considered to be | |||
| an improvement for visual clients rather than a prerequisite for all | an improvement for visual clients rather than a prerequisite for all | |||
| user agents. Therefore, such images will be given the supplementary | user agents. Therefore, such images will be given the supplementary | |||
| urgency. | urgency. | |||
| Values between 1 and 5 are used to represent this urgency, to provide | Values between 2 and 6 are used to represent this urgency, to provide | |||
| flexibility to the endpoints for giving some responses more or less | flexibility to the endpoints for giving some responses more or less | |||
| precedence than others that belong to the supplementary group. | precedence than others that belong to the supplementary group. | |||
| Section 6 explains how these values might be used. | Section 6 explains how these values might be used. | |||
| Clients SHOULD NOT use values 1 and 5. Servers MAY use these values | Clients SHOULD NOT use values 2 and 6. Servers MAY use these values | |||
| to prioritize a response above or below other supplementary | to prioritize a response above or below other supplementary | |||
| responses. | responses. | |||
| Clients MAY use values 2 to indicate that a request is given | Clients MAY use values 3 to indicate that a request is given | |||
| relatively high priority, or 4 to indicate relatively low priority, | relatively high priority, or 5 to indicate relatively low priority, | |||
| within the supplementary urgency group. | within the supplementary urgency group. | |||
| For example, an image certain to be visible at the top of the page, | For example, an image certain to be visible at the top of the page, | |||
| might be assigned a value of 2 instead of 3, as it will have a high | might be assigned a value of 3 instead of 4, as it will have a high | |||
| visual impact for the user. Conversely, an asynchronously loaded | visual impact for the user. Conversely, an asynchronously loaded | |||
| JavaScript file might be assigned an urgency value of 4, as it is | JavaScript file might be assigned an urgency value of 5, as it is | |||
| less likely to have a visual impact. | less likely to have a visual impact. | |||
| When none of the considerations above is applicable, the value of 3 | When none of the considerations above is applicable, the value of 3 | |||
| SHOULD be used. | SHOULD be used. | |||
| 4.1.4. background | 3.1.4. background | |||
| The background urgency (value 6) is used for responses of which the | The background urgency (value 7) is used for responses of which the | |||
| delivery can be postponed without having an impact on using other | delivery can be postponed without having an impact on using other | |||
| responses. | responses. | |||
| As an example, the download of a large file in a web browser would be | As an example, the download of a large file in a web browser would be | |||
| assigned the background urgency so it would not impact further page | assigned the background urgency so it would not impact further page | |||
| loads on the same connection. | loads on the same connection. | |||
| 4.2. progressive | 3.2. incremental | |||
| The "progressive" parameter takes an sh-boolean as the value that | The incremental("i") parameter takes an sh-boolean as the value that | |||
| indicates if a response can be processed progressively, i.e. provide | indicates if a response can be processed incrementally, i.e. provide | |||
| some meaningful output as chunks of the response arrive. | some meaningful output as chunks of the response arrive. | |||
| The default value of the "progressive" parameter is "0". | The default value of the incremental parameter is "0". | |||
| A server SHOULD distribute the bandwidth of a connection between | A server SHOULD distribute the bandwidth of a connection between | |||
| progressive responses that share the same urgency. | incremental responses that share the same urgency. | |||
| A server SHOULD transmit non-progressive responses one by one, | A server SHOULD transmit non-incremental responses one by one, | |||
| preferably in the order the requests were generated. Doing so | preferably in the order the requests were generated. Doing so | |||
| maximizes the chance of the client making progress in using the | maximizes the chance of the client making progress in using the | |||
| composition of the HTTP responses at the earliest moment. | composition of the HTTP responses at the earliest moment. | |||
| The following example shows a request for a JPEG file with the | The following example shows a request for a JPEG file with the | |||
| urgency parameter set to "3" and the progressive parameter set to | urgency parameter set to "4" and the incremental parameter set to | |||
| "1". | "1". | |||
| :method = GET | :method = GET | |||
| :scheme = https | :scheme = https | |||
| :authority = example.net | :authority = example.net | |||
| :path = /image.jpg | :path = /image.jpg | |||
| priority = urgency=3, progressive=?1 | priority = u=4, i=?1 | |||
| 3.3. Defining New Parameters | ||||
| When attempting to extend priorities, care must be taken to ensure | ||||
| any use of existing parameters are either unchanged or modified in a | ||||
| way that is backwards compatible for peers that are unaware of the | ||||
| extended meaning. | ||||
| 4. The Priority HTTP Header Field | ||||
| The Priority HTTP header field can appear in requests and responses. | ||||
| A client uses it to specify the priority of the response. A server | ||||
| uses it to inform the client that the priority was overwritten. An | ||||
| intermediary can use the Priority information from client requests | ||||
| and server responses to correct or amend the precedence to suit it | ||||
| (see Section 6). | ||||
| The Priority header field is an end-to-end signal of the request | ||||
| priority from the client or the response priority from the server. | ||||
| As is the ordinary case for HTTP caching ([RFC7234]), a response with | ||||
| a Priority header field might be cached and re-used for subsequent | ||||
| requests. When an origin server generates the Priority response | ||||
| header field based on properties of an HTTP request it receives, the | ||||
| server is expected to control the cacheability or the applicability | ||||
| of the cached response, by using header fields that control the | ||||
| caching behavior (e.g., Cache-Control, Vary). | ||||
| 5. Reprioritization | 5. Reprioritization | |||
| Once a client sends a request, circumstances might change and mean | After a client sends a request, it may be beneficial to change the | |||
| that it is beneficial to change the priority of the response. As an | priority of the response. As an example, a web browser might issue a | |||
| example, a web browser might issue a prefetch request for a | prefetch request for a JavaScript file with the urgency parameter of | |||
| JavaScript file with the urgency parameter of the Priority request | the Priority request header field set to "u=7" (background). Then, | |||
| header field set to "urgency=6" (background). Then, when the user | when the user navigates to a page which references the new JavaScript | |||
| navigates to a page which references the new JavaScript file, while | file, while the prefetch is in progress, the browser would send a | |||
| the prefetch is in progress, the browser would send a | reprioritization frame with the priority field value set to "u=0" | |||
| reprioritization frame with the priority field value set to | (prerequisite). | |||
| "urgency=-1" (prerequisite). | ||||
| However, a client cannot reprioritize a response by using the | In HTTP/2 and HTTP/3, after a request message is sent on a stream, | |||
| Priority header field. This is because an HTTP header field can only | the stream transitions to a state that prevents the client from | |||
| be sent as part of an HTTP message. Therefore, to support | sending additional frames on the stream. Therefore, a client cannot | |||
| reprioritization, it is necessary to define a HTTP-version-dependent | reprioritize a response by using the Priority header field. | |||
| mechanism for transmitting the priority parameters. | Modifying this behavior would require a semantic change to the | |||
| protocol, but this is avoided by restricting the stream on which a | ||||
| PRIORITY_UPDATE frame can be sent. In HTTP/2 the frame is on stream | ||||
| zero and in HTTP/3 it is sent on the control stream | ||||
| ([I-D.ietf-quic-http], Section 6.2.1). | ||||
| This document specifies a new PRIORITY_UPDATE frame type for HTTP/2 | This document specifies a new PRIORITY_UPDATE frame type for HTTP/2 | |||
| ([RFC7540]) and HTTP/3 ([I-D.ietf-quic-http]) that is specialized for | ([RFC7540]) and HTTP/3 ([I-D.ietf-quic-http]) which enables | |||
| reprioritization. It carries updated priority parameters and | reprioritization. It carries updated priority parameters and | |||
| references the target of the reprioritization based on a version- | references the target of the reprioritization based on a version- | |||
| specific identifier; in HTTP/2 this is the Stream ID, in HTTP/3 this | specific identifier; in HTTP/2 this is the Stream ID, in HTTP/3 this | |||
| is either the Stream ID or Push ID. | is either the Stream ID or Push ID. | |||
| In HTTP/2 and HTTP/3 a request message sent on a stream transitions | Unlike the header field, the reprioritization frame is a hop-by-hop | |||
| it into a state that prevents the client from sending additional | signal. | |||
| frames on the stream. Modifying this behavior requires a semantic | ||||
| change to the protocol, this is avoided by restricting the stream on | ||||
| which a PRIORITY_UPDATE frame can be sent. In HTTP/2 the frame is on | ||||
| stream zero and in HTTP/3 it is sent on the control stream | ||||
| ([I-D.ietf-quic-http], Section 6.2.1). | ||||
| 5.1. HTTP/2 PRIORITY_UPDATE Frame | 5.1. HTTP/2 PRIORITY_UPDATE Frame | |||
| The HTTP/2 PRIORITY_UPDATE frame (type=0xF) carries the stream ID of | The HTTP/2 PRIORITY_UPDATE frame (type=0xF) carries the stream ID of | |||
| the response that is being reprioritized, and the updated priority in | the response that is being reprioritized, and the updated priority in | |||
| ASCII text, using the same representation as that of the Priority | ASCII text, using the same representation as that of the Priority | |||
| header field value. | header field value. | |||
| The Stream Identifier field ([RFC7540], Section 4.1) in the | The Stream Identifier field ([RFC7540], Section 4.1) in the | |||
| PRIORITY_UPDATE frame header MUST be zero (0x0). | PRIORITY_UPDATE frame header MUST be zero (0x0). | |||
| skipping to change at page 11, line 27 ¶ | skipping to change at page 10, line 49 ¶ | |||
| 0 1 2 3 | 0 1 2 3 | |||
| 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 | 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 | |||
| +---------------------------------------------------------------+ | +---------------------------------------------------------------+ | |||
| |R| Stream ID (31) | | |R| Stream ID (31) | | |||
| +---------------------------------------------------------------+ | +---------------------------------------------------------------+ | |||
| | Priority Field Value (*) ... | | Priority Field Value (*) ... | |||
| +---------------------------------------------------------------+ | +---------------------------------------------------------------+ | |||
| Figure 1: HTTP/2 PRIORITY_UPDATE Frame Payload | Figure 1: HTTP/2 PRIORITY_UPDATE Frame Payload | |||
| The PRIORITY_UPDATE frame payload has the following fields: | ||||
| R: A reserved 1-bit field. The semantics of this bit are undefined, | ||||
| and the bit MUST remain unset (0x0) when sending and MUST be | ||||
| ignored when receiving. | ||||
| Stream ID: A 31-bit stream identifier for the stream that is the | ||||
| target of the priority update. | ||||
| Priority Field Value: The priority update value in ASCII text, | ||||
| encoded using Structured Headers. | ||||
| The HTTP/2 PRIORITY_UPDATE frame MUST NOT be sent prior to opening | ||||
| the stream. If a PRIORITY_UPDATE is received prior to the stream | ||||
| being opened, it MAY be treated as a connection error of type | ||||
| PROTOCOL_ERROR. | ||||
| TODO: add more description of how to handle things like receiving | TODO: add more description of how to handle things like receiving | |||
| PRIORITY_UPDATE on wrong stream, a PRIORITY_UPDATE with an invalid | PRIORITY_UPDATE on wrong stream, a PRIORITY_UPDATE with an invalid | |||
| ID, etc. | ID, etc. | |||
| 5.2. HTTP/3 PRIORITY_UPDATE Frame | 5.2. HTTP/3 PRIORITY_UPDATE Frame | |||
| The HTTP/3 PRIORITY_UPDATE frame (type=0xF) carries the identifier of | The HTTP/3 PRIORITY_UPDATE frame (type=0xF) carries the identifier of | |||
| the element that is being reprioritized, and the updated priority in | the element that is being reprioritized, and the updated priority in | |||
| ASCII text, using the same representation as that of the Priority | ASCII text, using the same representation as that of the Priority | |||
| header field value. | header field value. | |||
| skipping to change at page 12, line 14 ¶ | skipping to change at page 12, line 7 ¶ | |||
| T (Prioritized Element Type): A one-bit field indicating the type of | T (Prioritized Element Type): A one-bit field indicating the type of | |||
| element being prioritized. A value of 0 indicates a | element being prioritized. A value of 0 indicates a | |||
| reprioritization for a Request Stream, so the Prioritized Element | reprioritization for a Request Stream, so the Prioritized Element | |||
| ID is interpreted as a Stream ID. A value of 1 indicates a | ID is interpreted as a Stream ID. A value of 1 indicates a | |||
| reprioritization for a Push stream, so the Prioritized Element ID | reprioritization for a Push stream, so the Prioritized Element ID | |||
| is interpreted as a Push ID. | is interpreted as a Push ID. | |||
| Empty: A seven-bit field that has no semantic value. | Empty: A seven-bit field that has no semantic value. | |||
| Prioritized Element ID: The stream ID or push ID that is the target | ||||
| of the priority update. | ||||
| Priority Field Value: The priority update value in ASCII text, | ||||
| encoded using Structured Headers. | ||||
| The HTTP/3 PRIORITY_UPDATE frame MUST NOT be sent with an invalid | ||||
| identifier, including before the request stream has been opened or | ||||
| before a promised request has been received. If a server receives a | ||||
| PRIORITY_UPDATE specifying a push ID that has not been promised, it | ||||
| SHOULD be treated as a connection error of type H3_ID_ERROR. | ||||
| Because the HTTP/3 PRIORITY_UPDATE frame is sent on the control | ||||
| stream and there are no ordering guarantees between streams, a client | ||||
| that reprioritizes a request before receiving the response data might | ||||
| cause the server to receive a PRIORITY_UPDATE for an unknown request. | ||||
| If the request stream ID is within bidirectional stream limits, the | ||||
| PRIORITY_UPDATE frame SHOULD be buffered until the stream is opened | ||||
| and applied immediately after the request message has been processed. | ||||
| Holding PRIORITY_UPDATES consumes extra state on the peer, although | ||||
| the size of the state is bounded by bidirectional stream limits. | ||||
| There is no bound on the number of PRIORITY_UPDATES that can be sent, | ||||
| so an endpoint SHOULD store only the most recently received frame. | ||||
| TODO: add more description of how to handle things like receiving | TODO: add more description of how to handle things like receiving | |||
| PRIORITY_UPDATE on wrong stream, a PRIORITY_UPDATE with an invalid | PRIORITY_UPDATE on wrong stream, a PRIORITY_UPDATE with an invalid | |||
| ID, etc. | ID, etc. | |||
| 6. Merging Client- and Server-Driven Parameters | 6. Merging Client- and Server-Driven Parameters | |||
| It is not always the case that the client has the best understanding | It is not always the case that the client has the best understanding | |||
| of how the HTTP responses deserve to be prioritized. For example, | of how the HTTP responses deserve to be prioritized. For example, | |||
| use of an HTML document might depend heavily on one of the inline | use of an HTML document might depend heavily on one of the inline | |||
| images. Existence of such dependencies is typically best known to | images. Existence of such dependencies is typically best known to | |||
| skipping to change at page 12, line 32 ¶ | skipping to change at page 13, line 4 ¶ | |||
| use of an HTML document might depend heavily on one of the inline | use of an HTML document might depend heavily on one of the inline | |||
| images. Existence of such dependencies is typically best known to | images. Existence of such dependencies is typically best known to | |||
| the server. | the server. | |||
| By using the "Priority" response header, a server can override the | By using the "Priority" response header, a server can override the | |||
| prioritization hints provided by the client. When used, the | prioritization hints provided by the client. When used, the | |||
| parameters found in the response header field overrides those | parameters found in the response header field overrides those | |||
| specified by the client. | specified by the client. | |||
| For example, when the client sends an HTTP request with | For example, when the client sends an HTTP request with | |||
| :method = GET | :method = GET | |||
| :scheme = https | :scheme = https | |||
| :authority = example.net | :authority = example.net | |||
| :path = /menu.png | :path = /menu.png | |||
| priority = urgency=3, progressive=?1 | priority = u=4, i=?1 | |||
| and the origin responds with | and the origin responds with | |||
| :status = 200 | :status = 200 | |||
| content-type = image/png | content-type = image/png | |||
| priority = urgency=1 | priority = u=2 | |||
| the intermediary's understanding of the urgency is promoted from "3" | the intermediary's understanding of the urgency is promoted from "4" | |||
| to "1", because the server-provided value overrides the value | to "2", because the server-provided value overrides the value | |||
| provided by the client. The progressiveness continues to be "1", the | provided by the client. The incremental value continues to be "1", | |||
| value specified by the client, as the server did not specify the | the value specified by the client, as the server did not specify the | |||
| "progressive" parameter. | incremental("i") parameter. | |||
| 7. Security Considerations | 7. Security Considerations | |||
| 7.1. Fairness and Coalescing Intermediaries | 7.1. Fairness | |||
| As a general guideline, a server SHOULD NOT use priority information | ||||
| for making schedule decisions across multiple connections, unless it | ||||
| knows that those connections originate from the same client. Due to | ||||
| this, priority information conveyed over a non-coalesced HTTP | ||||
| connection (e.g., HTTP/1.1) might go unused. | ||||
| The remainder of this section discusses scenarios where unfairness is | ||||
| problematic and presents possible mitigations, or where unfairness is | ||||
| desirable. | ||||
| TODO: Discuss if we should add a signal that mitigates this issue. | ||||
| For example, we might add a SETTINGS parameter that indicates the | ||||
| next hop that the connection is NOT coalesced (see | ||||
| https://github.com/kazuho/draft-kazuho-httpbis-priority/issues/99). | ||||
| 7.1.1. Coalescing Intermediaries | ||||
| When an intermediary coalesces HTTP requests coming from multiple | When an intermediary coalesces HTTP requests coming from multiple | |||
| clients into one HTTP/2 or HTTP/3 connection going to the backend | clients into one HTTP/2 or HTTP/3 connection going to the backend | |||
| server, requests that originate from one client might have higher | server, requests that originate from one client might have higher | |||
| precedence than those coming from others. | precedence than those coming from others. | |||
| It is sometimes beneficial for the server running behind an | It is sometimes beneficial for the server running behind an | |||
| intermediary to obey to the value of the Priority header field. As | intermediary to obey to the value of the Priority header field. As | |||
| an example, a resource-constrained server might defer the | an example, a resource-constrained server might defer the | |||
| transmission of software update files that would have the background | transmission of software update files that would have the background | |||
| urgency being associated. However, in the worst case, the asymmetry | urgency being associated. However, in the worst case, the asymmetry | |||
| between the precedence declared by multiple clients might cause | between the precedence declared by multiple clients might cause | |||
| responses going to one end client to be delayed totally after those | responses going to one end client to be delayed totally after those | |||
| going to another. | going to another. | |||
| In order to mitigate this fairness problem, when a server responds to | In order to mitigate this fairness problem, when a server responds to | |||
| a request that is known to have come through an intermediary, the | a request that is known to have come through an intermediary, the | |||
| server SHOULD prioritize the response as if it was assigned the | server SHOULD prioritize the response as if it was assigned the | |||
| priority of "urgency=0, progressive=?1" (i.e. round-robin) regardless | priority of "u=1, i=?1" (i.e. round-robin) regardless of the value of | |||
| of the value of the Priority header field being transmitted, unless | the Priority header field being transmitted, unless the server knows | |||
| the server has the knowledge that no intermediaries are coalescing | the intermediary is not coalescing requests from multiple clients. | |||
| requests from multiple clients. That can be determined by the | ||||
| settings when the intermediaries support this specification (see | ||||
| Section 3.2.2), or else through configuration. | ||||
| A server can determine if a request came from an intermediary through | A server can determine if a request came from an intermediary through | |||
| configuration, or by consulting if that request contains one of the | configuration, or by consulting if that request contains one of the | |||
| following header fields: | following header fields: | |||
| o CDN-Loop ([RFC8586]) | o CDN-Loop ([RFC8586]) | |||
| o Forwarded, X-Forwarded-For ([RFC7239]) | o Forwarded, X-Forwarded-For ([RFC7239]) | |||
| o Via ([RFC7230], Section 5.7.1) | o Via ([RFC7230], Section 5.7.1) | |||
| skipping to change at page 14, line 5 ¶ | skipping to change at page 14, line 36 ¶ | |||
| Responding to requests coming through an intermediary in a round- | Responding to requests coming through an intermediary in a round- | |||
| robin manner works well when the network bottleneck exists between | robin manner works well when the network bottleneck exists between | |||
| the intermediary and the end client, as the intermediary would be | the intermediary and the end client, as the intermediary would be | |||
| buffering the responses and then be forwarding the chunks of those | buffering the responses and then be forwarding the chunks of those | |||
| buffered responses based on the prioritization scheme it implements. | buffered responses based on the prioritization scheme it implements. | |||
| A sophisticated server MAY use a weighted round-robin reflecting the | A sophisticated server MAY use a weighted round-robin reflecting the | |||
| urgencies expressed in the requests, so that less urgent responses | urgencies expressed in the requests, so that less urgent responses | |||
| would receive less bandwidth in case the bottleneck exists between | would receive less bandwidth in case the bottleneck exists between | |||
| the server and the intermediary. | the server and the intermediary. | |||
| 7.1.2. HTTP/1.x Back Ends | ||||
| It is common for CDN infrastructure to support different HTTP | ||||
| versions on the front end and back end. For instance, the client- | ||||
| facing edge might support HTTP/2 and HTTP/3 while communication to | ||||
| back end servers is done using HTTP/1.1. Unlike with connection | ||||
| coalescing, the CDN will "de-mux" requests into discrete connections | ||||
| to the back end. As HTTP/1.1 and older do not provide a way to | ||||
| concurrently transmit multiple responses, there is no immediate | ||||
| fairness issue in protocol. However, back end servers MAY still use | ||||
| client headers for request scheduling. Back end servers SHOULD only | ||||
| schedule based on client priority information where that information | ||||
| can be scoped to individual end clients. Authentication and other | ||||
| session information might provide this linkability. | ||||
| 7.1.3. Intentional Introduction of Unfairness | ||||
| It is sometimes beneficial to deprioritize the transmission of one | ||||
| connection over others, knowing that doing so introduces a certain | ||||
| amount of unfairness between the connections and therefore between | ||||
| the requests served on those connections. | ||||
| For example, a server might use a scavenging congestion controller on | ||||
| connections that only convey background priority responses such as | ||||
| software update images. Doing so improves responsiveness of other | ||||
| connections at the cost of delaying the delivery of updates. | ||||
| Also, a client MAY use the priority values for making local | ||||
| scheduling choices for the requests it initiates. | ||||
| 8. Considerations | 8. Considerations | |||
| 8.1. Why use an End-to-End Header Field? | 8.1. Why use an End-to-End Header Field? | |||
| Contrary to the prioritization scheme of HTTP/2 that uses a hop-by- | Contrary to the prioritization scheme of HTTP/2 that uses a hop-by- | |||
| hop frame, the Priority header field is defined as end-to-end. | hop frame, the Priority header field is defined as end-to-end. | |||
| The rationale is that the Priority header field transmits how each | The rationale is that the Priority header field transmits how each | |||
| response affects the client's processing of those responses, rather | response affects the client's processing of those responses, rather | |||
| than how relatively urgent each response is to others. The way a | than how relatively urgent each response is to others. The way a | |||
| skipping to change at page 14, line 39 ¶ | skipping to change at page 16, line 5 ¶ | |||
| textual value makes the prioritization scheme extensible; see the | textual value makes the prioritization scheme extensible; see the | |||
| discussion below. | discussion below. | |||
| 8.2. Why do Urgencies Have Meanings? | 8.2. Why do Urgencies Have Meanings? | |||
| One of the aims of this specification is to define a mechanism for | One of the aims of this specification is to define a mechanism for | |||
| merging client- and server-provided hints for prioritizing the | merging client- and server-provided hints for prioritizing the | |||
| responses. For that to work, each urgency level needs to have a | responses. For that to work, each urgency level needs to have a | |||
| well-defined meaning. As an example, a server can assign the highest | well-defined meaning. As an example, a server can assign the highest | |||
| precedence among the supplementary responses to an HTTP response | precedence among the supplementary responses to an HTTP response | |||
| carrying an icon, because the meaning of "urgency=1" is shared among | carrying an icon, because the meaning of "u=2" is shared among the | |||
| the endpoints. | endpoints. | |||
| This specification restricts itself to defining a minimum set of | This specification restricts itself to defining a minimum set of | |||
| urgency levels in order to provide sufficient granularity for | urgency levels in order to provide sufficient granularity for | |||
| prioritizing responses for ordinary web browsing, at minimal | prioritizing responses for ordinary web browsing, at minimal | |||
| complexity. | complexity. | |||
| However, that does not mean that the prioritization scheme would | However, that does not mean that the prioritization scheme would | |||
| forever be stuck to the eight levels. The design provides | forever be stuck to the eight levels. The design provides | |||
| extensibility. If deemed necessary, it would be possible to | extensibility. If deemed necessary, it would be possible to | |||
| subdivide any of the eight urgency levels that are currently defined. | subdivide any of the eight urgency levels that are currently defined. | |||
| skipping to change at page 15, line 25 ¶ | skipping to change at page 16, line 40 ¶ | |||
| embed its own prioritization hints into the HTTP request that it | embed its own prioritization hints into the HTTP request that it | |||
| forwards to the backend server, as otherwise the Priority header | forwards to the backend server, as otherwise the Priority header | |||
| field would not be as helpful to the backend (see Section 7.1). | field would not be as helpful to the backend (see Section 7.1). | |||
| One way of achieving that, without dropping the original signal, | One way of achieving that, without dropping the original signal, | |||
| would be to let the intermediary express its own signal using the | would be to let the intermediary express its own signal using the | |||
| Priority header field, at the same time transplanting the original | Priority header field, at the same time transplanting the original | |||
| value to a different header field. | value to a different header field. | |||
| As an example, when a client sends an HTTP request carrying a | As an example, when a client sends an HTTP request carrying a | |||
| priority of "urgency=-1" and the intermediary wants to instead | priority of "u=0" and the intermediary wants to instead associate | |||
| associate "urgency=0; progressive=?1", the intermediary would send a | "u=1; i=?1", the intermediary would send a HTTP request that contains | |||
| HTTP request that contains to the following two header fields to the | the following two header fields to the backend server: | |||
| backend server: | ||||
| priority = urgency=0; progressive=?1 | priority = u=1; i=?1 | |||
| original-priority = urgency=-1 | original-priority = u=0 | |||
| 9. IANA Considerations | 9. IANA Considerations | |||
| This specification registers the following entry in the Permanent | This specification registers the following entry in the Permanent | |||
| Message Header Field Names registry established by [RFC3864]: | Message Header Field Names registry established by [RFC3864]: | |||
| Header field name: Priority | Header field name: Priority | |||
| Applicable protocol: http | Applicable protocol: http | |||
| skipping to change at page 16, line 5 ¶ | skipping to change at page 17, line 20 ¶ | |||
| Author/change controller: IETF | Author/change controller: IETF | |||
| Specification document(s): This document | Specification document(s): This document | |||
| Related information: n/a | Related information: n/a | |||
| This specification registers the following entry in the HTTP/2 | This specification registers the following entry in the HTTP/2 | |||
| Settings registry established by [RFC7540]: | Settings registry established by [RFC7540]: | |||
| Name: SETTINGS_PRIORITIES | Name: SETTINGS_DEPRECATE_HTTP2_PRIORITIES | |||
| Code: 0x9 | ||||
| Initial value: 0 | ||||
| Specification: This document | ||||
| This specification registers the following entry in the HTTP/2 | ||||
| Settings registry established by [I-D.ietf-quic-http]: | ||||
| Name: SETTINGS_PRIORITIES | ||||
| Code: 0x9 | Code: 0x9 | |||
| Initial value: 0 | Initial value: 0 | |||
| Specification: This document | Specification: This document | |||
| This specification registers the following entry in the HTTP/2 Frame | This specification registers the following entry in the HTTP/2 Frame | |||
| Type registry established by [RFC7540]: | Type registry established by [RFC7540]: | |||
| skipping to change at page 16, line 42 ¶ | skipping to change at page 17, line 46 ¶ | |||
| This specification registers the following entries in the HTTP/3 | This specification registers the following entries in the HTTP/3 | |||
| Frame Type registry established by [I-D.ietf-quic-http]: | Frame Type registry established by [I-D.ietf-quic-http]: | |||
| Frame Type: PRIORITY_UPDATE | Frame Type: PRIORITY_UPDATE | |||
| Code: 0xF | Code: 0xF | |||
| Specification: This document | Specification: This document | |||
| 9.1. HTTP Prioritization Scheme Registry | ||||
| This document establishes a registry for HTTP prioritization scheme | ||||
| codes to be used in conjunction with the SETTINGS_PRIORITIES | ||||
| parameter. The "HTTP Prioritization Scheme" registry manages an | ||||
| 8-bit space. The "HTTP Prioritization Scheme" registry operates | ||||
| under either of the "IETF Review" or "IESG Approval" policies | ||||
| [RFC5226] for values between 0x00 and 0xef, with values between 0xf0 | ||||
| and 0xff being reserved for Experimental Use. | ||||
| New entries in this registry require the following information: | ||||
| Prioritization Scheme: A name or label for the prioritization | ||||
| scheme. | ||||
| Code: The 8-bit code assigned to the prioritization scheme. | ||||
| Specification: A reference to a specification that includes a | ||||
| description of the prioritization scheme. | ||||
| The entries in the following table are registered by this document. | ||||
| +-----------------------+------+---------------+ | ||||
| | Prioritization Scheme | Code | Specification | | ||||
| +-----------------------+------+---------------+ | ||||
| | H2_TREE | 1 | Section 3.2.1 | | ||||
| | URGENCY | 2 | Section 3.2.2 | | ||||
| +-----------------------+------+---------------+ | ||||
| 10. References | 10. References | |||
| 10.1. Normative References | 10.1. Normative References | |||
| [I-D.ietf-quic-http] | [I-D.ietf-quic-http] | |||
| Bishop, M., "Hypertext Transfer Protocol Version 3 | Bishop, M., "Hypertext Transfer Protocol Version 3 | |||
| (HTTP/3)", draft-ietf-quic-http-23 (work in progress), | (HTTP/3)", draft-ietf-quic-http-23 (work in progress), | |||
| September 2019. | September 2019. | |||
| [I-D.ietf-quic-transport] | [I-D.ietf-quic-transport] | |||
| Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed | Iyengar, J. and M. Thomson, "QUIC: A UDP-Based Multiplexed | |||
| and Secure Transport", draft-ietf-quic-transport-23 (work | and Secure Transport", draft-ietf-quic-transport-23 (work | |||
| in progress), September 2019. | in progress), September 2019. | |||
| [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
| Requirement Levels", BCP 14, RFC 2119, | Requirement Levels", BCP 14, RFC 2119, | |||
| DOI 10.17487/RFC2119, March 1997, | DOI 10.17487/RFC2119, March 1997, | |||
| <https://www.rfc-editor.org/info/rfc2119>. | <https://www.rfc-editor.org/info/rfc2119>. | |||
| [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an | ||||
| IANA Considerations Section in RFCs", RFC 5226, | ||||
| DOI 10.17487/RFC5226, May 2008, | ||||
| <https://www.rfc-editor.org/info/rfc5226>. | ||||
| [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer | [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer | |||
| Protocol (HTTP/1.1): Message Syntax and Routing", | Protocol (HTTP/1.1): Message Syntax and Routing", | |||
| RFC 7230, DOI 10.17487/RFC7230, June 2014, | RFC 7230, DOI 10.17487/RFC7230, June 2014, | |||
| <https://www.rfc-editor.org/info/rfc7230>. | <https://www.rfc-editor.org/info/rfc7230>. | |||
| [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext | [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext | |||
| Transfer Protocol Version 2 (HTTP/2)", RFC 7540, | Transfer Protocol Version 2 (HTTP/2)", RFC 7540, | |||
| DOI 10.17487/RFC7540, May 2015, | DOI 10.17487/RFC7540, May 2015, | |||
| <https://www.rfc-editor.org/info/rfc7540>. | <https://www.rfc-editor.org/info/rfc7540>. | |||
| skipping to change at page 18, line 27 ¶ | skipping to change at page 18, line 47 ¶ | |||
| [I-D.lassey-priority-setting] | [I-D.lassey-priority-setting] | |||
| Lassey, B. and L. Pardue, "Declaring Support for HTTP/2 | Lassey, B. and L. Pardue, "Declaring Support for HTTP/2 | |||
| Priorities", draft-lassey-priority-setting-00 (work in | Priorities", draft-lassey-priority-setting-00 (work in | |||
| progress), July 2019. | progress), July 2019. | |||
| [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration | [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration | |||
| Procedures for Message Header Fields", BCP 90, RFC 3864, | Procedures for Message Header Fields", BCP 90, RFC 3864, | |||
| DOI 10.17487/RFC3864, September 2004, | DOI 10.17487/RFC3864, September 2004, | |||
| <https://www.rfc-editor.org/info/rfc3864>. | <https://www.rfc-editor.org/info/rfc3864>. | |||
| [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, | ||||
| Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", | ||||
| RFC 7234, DOI 10.17487/RFC7234, June 2014, | ||||
| <https://www.rfc-editor.org/info/rfc7234>. | ||||
| [RFC7239] Petersson, A. and M. Nilsson, "Forwarded HTTP Extension", | [RFC7239] Petersson, A. and M. Nilsson, "Forwarded HTTP Extension", | |||
| RFC 7239, DOI 10.17487/RFC7239, June 2014, | RFC 7239, DOI 10.17487/RFC7239, June 2014, | |||
| <https://www.rfc-editor.org/info/rfc7239>. | <https://www.rfc-editor.org/info/rfc7239>. | |||
| [RFC8081] Lilley, C., "The "font" Top-Level Media Type", RFC 8081, | [RFC8081] Lilley, C., "The "font" Top-Level Media Type", RFC 8081, | |||
| DOI 10.17487/RFC8081, February 2017, | DOI 10.17487/RFC8081, February 2017, | |||
| <https://www.rfc-editor.org/info/rfc8081>. | <https://www.rfc-editor.org/info/rfc8081>. | |||
| [RFC8586] Ludin, S., Nottingham, M., and N. Sullivan, "Loop | [RFC8586] Ludin, S., Nottingham, M., and N. Sullivan, "Loop | |||
| Detection in Content Delivery Networks (CDNs)", RFC 8586, | Detection in Content Delivery Networks (CDNs)", RFC 8586, | |||
| skipping to change at page 19, line 4 ¶ | skipping to change at page 19, line 31 ¶ | |||
| [2] https://github.com/pmeenan/http3-prioritization-proposal | [2] https://github.com/pmeenan/http3-prioritization-proposal | |||
| Appendix A. Acknowledgements | Appendix A. Acknowledgements | |||
| Roy Fielding presented the idea of using a header field for | Roy Fielding presented the idea of using a header field for | |||
| representing priorities in http://tools.ietf.org/agenda/83/slides/ | representing priorities in http://tools.ietf.org/agenda/83/slides/ | |||
| slides-83-httpbis-5.pdf [1]. In https://github.com/pmeenan/http3- | slides-83-httpbis-5.pdf [1]. In https://github.com/pmeenan/http3- | |||
| prioritization-proposal [2], Patrick Meenan advocates for | prioritization-proposal [2], Patrick Meenan advocates for | |||
| representing the priorities using a tuple of urgency and concurrency. | representing the priorities using a tuple of urgency and concurrency. | |||
| The ability to deprecate HTTP/2 priortization is based on | ||||
| The negotiation scheme described in this document is based on | ||||
| [I-D.lassey-priority-setting], authored by Brad Lassey and Lucas | [I-D.lassey-priority-setting], authored by Brad Lassey and Lucas | |||
| Pardue. | Pardue, with modifications based on feedback that was not | |||
| incorporated into an update to that document. | ||||
| The motivation for defining an alternative to HTTP/2 priorities is | The motivation for defining an alternative to HTTP/2 priorities is | |||
| drawn from discussion within the broad HTTP community. Special | drawn from discussion within the broad HTTP community. Special | |||
| thanks to Roberto Peon, Martin Thomson and Netflix for text that was | thanks to Roberto Peon, Martin Thomson and Netflix for text that was | |||
| incorporated explicitly in this document. | incorporated explicitly in this document. | |||
| In addition to the people above, this document owes a lot to the | In addition to the people above, this document owes a lot to the | |||
| extensive discussion in the HTTP priority design team, consisting of | extensive discussion in the HTTP priority design team, consisting of | |||
| Alan Frindell, Andrew Galloni, Craig Taylor, Ian Swett, Kazuho Oku, | Alan Frindell, Andrew Galloni, Craig Taylor, Ian Swett, Kazuho Oku, | |||
| Lucas Pardue, Matthew Cox, Mike Bishop, Roberto Peon, Robin Marx, Roy | Lucas Pardue, Matthew Cox, Mike Bishop, Roberto Peon, Robin Marx, Roy | |||
| Fielding. | Fielding. | |||
| Appendix B. Change Log | Appendix B. Change Log | |||
| B.1. Since draft-kazuho-httpbis-priority-03 | ||||
| B.1. Since draft-kazuho-httpbis-priority-02 | o Changed numbering from [-1,6] to [0,7] (#78) | |||
| o Replaced priority scheme negotiation with HTTP/2 priority | ||||
| deprecation (#100) | ||||
| o Shorten parameter names (#108) | ||||
| o Expand on considerations (#105, #107, #109, #110, #111, #113) | ||||
| B.2. Since draft-kazuho-httpbis-priority-02 | ||||
| o Consolidation of the problem statement (#61, #73) | o Consolidation of the problem statement (#61, #73) | |||
| o Define SETTINGS_PRIORITIES for negotiation (#58, #69) | o Define SETTINGS_PRIORITIES for negotiation (#58, #69) | |||
| o Define PRIORITY_UPDATE frame for HTTP/2 and HTTP/3 (#51) | o Define PRIORITY_UPDATE frame for HTTP/2 and HTTP/3 (#51) | |||
| o Explain fairness issue and mitigations (#56) | o Explain fairness issue and mitigations (#56) | |||
| B.2. Since draft-kazuho-httpbis-priority-01 | B.3. Since draft-kazuho-httpbis-priority-01 | |||
| o Explain how reprioritization might be supported. | o Explain how reprioritization might be supported. | |||
| B.3. Since draft-kazuho-httpbis-priority-00 | B.4. Since draft-kazuho-httpbis-priority-00 | |||
| o Expand urgency levels from 3 to 8. | o Expand urgency levels from 3 to 8. | |||
| Authors' Addresses | Authors' Addresses | |||
| Kazuho Oku | Kazuho Oku | |||
| Fastly | Fastly | |||
| Email: kazuhooku@gmail.com | Email: kazuhooku@gmail.com | |||
| End of changes. 73 change blocks. | ||||
| 266 lines changed or deleted | 294 lines changed or added | |||
This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||