| draft-ietf-httpbis-priority-01.txt | draft-ietf-httpbis-priority-02.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: January 14, 2021 Cloudflare | Expires: April 4, 2021 Cloudflare | |||
| July 13, 2020 | October 01, 2020 | |||
| Extensible Prioritization Scheme for HTTP | Extensible Prioritization Scheme for HTTP | |||
| draft-ietf-httpbis-priority-01 | draft-ietf-httpbis-priority-02 | |||
| 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 2, line 7 ¶ | skipping to change at page 2, line 7 ¶ | |||
| 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 January 14, 2021. | This Internet-Draft will expire on April 4, 2021. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2020 IETF Trust and the persons identified as the | Copyright (c) 2020 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 31 ¶ | skipping to change at page 2, line 31 ¶ | |||
| 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 | |||
| 2.1. Disabling HTTP/2 Priorities . . . . . . . . . . . . . . . 5 | 2.1. Disabling HTTP/2 Priorities . . . . . . . . . . . . . . . 5 | |||
| 3. Priority Parameters . . . . . . . . . . . . . . . . . . . . . 6 | 3. Priority Parameters . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 3.1. Urgency . . . . . . . . . . . . . . . . . . . . . . . . . 6 | 3.1. Urgency . . . . . . . . . . . . . . . . . . . . . . . . . 7 | |||
| 3.2. Incremental . . . . . . . . . . . . . . . . . . . . . . . 7 | 3.2. Incremental . . . . . . . . . . . . . . . . . . . . . . . 7 | |||
| 3.3. Defining New Parameters . . . . . . . . . . . . . . . . . 8 | 3.3. Defining New Parameters . . . . . . . . . . . . . . . . . 8 | |||
| 4. The Priority HTTP Header Field . . . . . . . . . . . . . . . 8 | 4. The Priority HTTP Header Field . . . . . . . . . . . . . . . 8 | |||
| 5. Reprioritization . . . . . . . . . . . . . . . . . . . . . . 8 | 5. Reprioritization . . . . . . . . . . . . . . . . . . . . . . 9 | |||
| 5.1. HTTP/2 PRIORITY_UPDATE Frame . . . . . . . . . . . . . . 9 | 6. The PRIORITY_UPDATE Frame . . . . . . . . . . . . . . . . . . 9 | |||
| 5.2. HTTP/3 PRIORITY_UPDATE Frame . . . . . . . . . . . . . . 10 | 6.1. HTTP/2 PRIORITY_UPDATE Frame . . . . . . . . . . . . . . 10 | |||
| 6. Merging Client- and Server-Driven Parameters . . . . . . . . 11 | 6.2. HTTP/3 PRIORITY_UPDATE Frame . . . . . . . . . . . . . . 11 | |||
| 7. Client Scheduling . . . . . . . . . . . . . . . . . . . . . . 12 | 7. Merging Client- and Server-Driven Parameters . . . . . . . . 12 | |||
| 8. Fairness . . . . . . . . . . . . . . . . . . . . . . . . . . 12 | 8. Client Scheduling . . . . . . . . . . . . . . . . . . . . . . 13 | |||
| 8.1. Coalescing Intermediaries . . . . . . . . . . . . . . . . 13 | 9. Server Scheduling . . . . . . . . . . . . . . . . . . . . . . 13 | |||
| 8.2. HTTP/1.x Back Ends . . . . . . . . . . . . . . . . . . . 13 | 10. Fairness . . . . . . . . . . . . . . . . . . . . . . . . . . 14 | |||
| 8.3. Intentional Introduction of Unfairness . . . . . . . . . 14 | 10.1. Coalescing Intermediaries . . . . . . . . . . . . . . . 15 | |||
| 9. Why use an End-to-End Header Field? . . . . . . . . . . . . . 14 | 10.2. HTTP/1.x Back Ends . . . . . . . . . . . . . . . . . . . 15 | |||
| 10. Security Considerations . . . . . . . . . . . . . . . . . . . 15 | 10.3. Intentional Introduction of Unfairness . . . . . . . . . 16 | |||
| 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 | 11. Why use an End-to-End Header Field? . . . . . . . . . . . . . 16 | |||
| 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 16 | 12. Security Considerations . . . . . . . . . . . . . . . . . . . 16 | |||
| 12.1. Normative References . . . . . . . . . . . . . . . . . . 16 | 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 | |||
| 12.2. Informative References . . . . . . . . . . . . . . . . . 17 | 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 | |||
| 12.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 18 | 14.1. Normative References . . . . . . . . . . . . . . . . . . 18 | |||
| Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 18 | 14.2. Informative References . . . . . . . . . . . . . . . . . 19 | |||
| Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 18 | 14.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 19 | |||
| B.1. Since draft-ietf-httpbis-priority-00 . . . . . . . . . . 18 | Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 20 | |||
| B.2. Since draft-kazuho-httpbis-priority-04 . . . . . . . . . 19 | Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 20 | |||
| B.3. Since draft-kazuho-httpbis-priority-03 . . . . . . . . . 19 | B.1. Since draft-ietf-httpbis-priority-01 . . . . . . . . . . 20 | |||
| B.4. Since draft-kazuho-httpbis-priority-02 . . . . . . . . . 19 | B.2. Since draft-ietf-httpbis-priority-00 . . . . . . . . . . 20 | |||
| B.5. Since draft-kazuho-httpbis-priority-01 . . . . . . . . . 19 | B.3. Since draft-kazuho-httpbis-priority-04 . . . . . . . . . 21 | |||
| B.6. Since draft-kazuho-httpbis-priority-00 . . . . . . . . . 19 | B.4. Since draft-kazuho-httpbis-priority-03 . . . . . . . . . 21 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 20 | B.5. Since draft-kazuho-httpbis-priority-02 . . . . . . . . . 21 | |||
| B.6. Since draft-kazuho-httpbis-priority-01 . . . . . . . . . 21 | ||||
| B.7. Since draft-kazuho-httpbis-priority-00 . . . . . . . . . 21 | ||||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 22 | ||||
| 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 | |||
| skipping to change at page 3, line 50 ¶ | skipping to change at page 4, line 5 ¶ | |||
| end format. Along with the protocol-version-specific frame for | end format. Along with the protocol-version-specific frame for | |||
| reprioritization, this prioritization scheme acts as a substitute for | reprioritization, this prioritization scheme acts as a substitute for | |||
| the original prioritization scheme of HTTP/2. | the original prioritization scheme of HTTP/2. | |||
| 1.1. Notational Conventions | 1.1. Notational Conventions | |||
| The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
| "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | |||
| document are to be interpreted as described in [RFC2119]. | document are to be interpreted as described in [RFC2119]. | |||
| The terms sh-token and sh-boolean are imported from | The terms sf-token and sf-boolean are imported from | |||
| [STRUCTURED-HEADERS]. | [STRUCTURED-FIELDS]. | |||
| Example HTTP requests and responses use the HTTP/2-style formatting | Example HTTP requests and responses use the HTTP/2-style formatting | |||
| from [RFC7540]. | from [RFC7540]. | |||
| This document uses the variable-length integer encoding from | This document uses the variable-length integer encoding from | |||
| [I-D.ietf-quic-transport]. | [I-D.ietf-quic-transport]. | |||
| The term control stream is used to describe the HTTP/2 stream with | ||||
| identifier 0x0, and HTTP/3 control stream; see [I-D.ietf-quic-http], | ||||
| Section 6.2.1. | ||||
| 2. Motivation for Replacing HTTP/2 Priorities | 2. Motivation for Replacing HTTP/2 Priorities | |||
| An important feature of any implementation of a protocol that | An important feature of any implementation of a protocol that | |||
| provides multiplexing is the ability to prioritize the sending of | provides multiplexing is the ability to prioritize the sending of | |||
| information. This was an important realization in the design of | information. This was an important realization in the design of | |||
| HTTP/2. Prioritization is a difficult problem, so it will always be | HTTP/2. Prioritization is a difficult problem, so it will always be | |||
| suboptimal, particularly if one endpoint operates in ignorance of the | suboptimal, particularly if one endpoint operates in ignorance of the | |||
| needs of its peer. | needs of its peer. | |||
| HTTP/2 introduced a complex prioritization signaling scheme that used | HTTP/2 introduced a complex prioritization signaling scheme that used | |||
| skipping to change at page 4, line 34 ¶ | skipping to change at page 4, line 41 ¶ | |||
| The rich flexibility of client-driven HTTP/2 prioritization tree | The rich flexibility of client-driven HTTP/2 prioritization tree | |||
| building is rarely exercised. Experience has shown that clients tend | building is rarely exercised. Experience has shown that clients tend | |||
| to choose a single model optimized for a web use case and experiment | to choose a single model optimized for a web use case and experiment | |||
| within the model constraints, or do nothing at all. Furthermore, | within the model constraints, or do nothing at all. Furthermore, | |||
| many clients build their prioritization tree in a unique way, which | many clients build their prioritization tree in a unique way, which | |||
| makes it difficult for servers to understand their intent and act or | makes it difficult for servers to understand their intent and act or | |||
| intervene accordingly. | intervene accordingly. | |||
| Many HTTP/2 server implementations do not include support for the | Many HTTP/2 server implementations do not include support for the | |||
| priority scheme, some favoring instead bespoke server-driven schemes | priority scheme. Some instead favor custom server-driven schemes | |||
| based on heuristics and other hints, like the content type of | based on heuristics or other hints, such as resource content type or | |||
| resources and the request generation order. For example, a server, | request generation order. For example, a server, with knowledge of | |||
| with knowledge of the document structure, might want to prioritize | the document structure, might want to prioritize the delivery of | |||
| the delivery of images that are critical to user experience above | images that are critical to user experience above other images, but | |||
| other images, but below the CSS files. Since client trees vary, it | below the CSS files. Since client trees vary, it is impossible for | |||
| is impossible for the server to determine how such images should be | the server to determine how such images should be prioritized against | |||
| prioritized against other responses. | other responses. | |||
| The HTTP/2 scheme allows intermediaries to coalesce multiple client | The HTTP/2 scheme allows intermediaries to coalesce multiple client | |||
| trees into a single tree that is used for a single upstream HTTP/2 | trees into a single tree that is used for a single upstream HTTP/2 | |||
| connection. However, most intermediaries do not support this. The | connection. However, most intermediaries do not support this. The | |||
| scheme does not define a method that can be used by a server to | scheme does not define a method that can be used by a server to | |||
| express the priority of a response. Without such a method, | express the priority of a response. Without such a method, | |||
| intermediaries cannot coordinate client-driven and server-driven | intermediaries cannot coordinate client-driven and server-driven | |||
| priorities. | priorities. | |||
| HTTP/2 describes denial-of-service considerations for | HTTP/2 describes denial-of-service considerations for | |||
| skipping to change at page 5, line 49 ¶ | skipping to change at page 6, line 8 ¶ | |||
| parameter value after the first SETTINGS frame. Detection of a | parameter value after the first SETTINGS frame. Detection of a | |||
| change by a receiver MUST be treated as a connection error of type | change by a receiver MUST be treated as a connection error of type | |||
| PROTOCOL_ERROR. | PROTOCOL_ERROR. | |||
| Until the client receives the SETTINGS frame from the server, the | Until the client receives the SETTINGS frame from the server, the | |||
| client SHOULD send both the priority signal defined in the HTTP/2 | client SHOULD send both the priority signal defined in the HTTP/2 | |||
| priority scheme and also that of this prioritization scheme. Once | priority scheme and also that of this prioritization scheme. Once | |||
| the client learns that the HTTP/2 priority scheme is deprecated, it | the client learns that the HTTP/2 priority scheme is deprecated, it | |||
| SHOULD stop sending the HTTP/2 priority signals. If the client | SHOULD stop sending the HTTP/2 priority signals. If the client | |||
| learns that the HTTP/2 priority scheme is not deprecated, it SHOULD | learns that the HTTP/2 priority scheme is not deprecated, it SHOULD | |||
| stop sending PRIORITY_UPDATE frames (Section 5.1), but MAY continue | stop sending PRIORITY_UPDATE frames (Section 6.1), but MAY continue | |||
| sending the Priority header field (Section 4), as it is an end-to-end | sending the Priority header field (Section 4), as it is an end-to-end | |||
| signal that might be useful to nodes behind the server that the | signal that might be useful to nodes behind the server that the | |||
| client is directly connected to. | client is directly connected to. | |||
| The SETTINGS frame precedes any priority signal sent from a client in | 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 | HTTP/2, so a server can determine if it should respect the HTTP/2 | |||
| scheme before building state. | scheme before building state. A server that receives | |||
| SETTINGS_DEPRECATE_HTTP2_PRIORITIES MUST ignore HTTP/2 priority | ||||
| signals. | ||||
| Where both endpoints disable HTTP/2 priorities, the client is | ||||
| expected to send this scheme's priority signal. Handling of omitted | ||||
| signals is described in Section 3. | ||||
| 3. Priority Parameters | 3. Priority Parameters | |||
| The priority information is a sequence of key-value pairs, providing | The priority information is a sequence of key-value pairs, providing | |||
| room for future extensions. Each key-value pair represents a | room for future extensions. Each key-value pair represents a | |||
| priority parameter. | priority parameter. | |||
| The Priority HTTP header field (Section 4) is an end-to-end way to | The Priority HTTP header field (Section 4) is an end-to-end way to | |||
| transmit this set of parameters when a request or a response is | transmit this set of parameters when a request or a response is | |||
| issued. In order to reprioritize a request, HTTP-version-specific | issued. In order to reprioritize a request, HTTP-version-specific | |||
| frames (Section 5.1 and Section 5.2) are used by clients to transmit | frames (Section 6.1 and Section 6.2) are used by clients to transmit | |||
| the same information on a single hop. If intermediaries want to | the same information on a single hop. If intermediaries want to | |||
| specify prioritization on a multiplexed HTTP connection, they SHOULD | specify prioritization on a multiplexed HTTP connection, they SHOULD | |||
| use a PRIORITY_UPDATE frame and SHOULD NOT change the Priority header | use a PRIORITY_UPDATE frame and SHOULD NOT change the Priority header | |||
| field. | field. | |||
| In both cases, the set of priority parameters is encoded as a | In both cases, the set of priority parameters is encoded as a | |||
| Structured Headers Dictionary ([STRUCTURED-HEADERS]). | Structured Fields Dictionary ([STRUCTURED-FIELDS]). | |||
| This document defines the urgency("u") and incremental("i") | This document defines the urgency("u") and incremental("i") | |||
| parameters. When receiving an HTTP request that does not carry these | parameters. When receiving an HTTP request that does not carry these | |||
| priority parameters, a server SHOULD act as if their default values | priority parameters, a server SHOULD act as if their default values | |||
| were specified. Note that handling of omitted parameters is | were specified. Note that handling of omitted parameters is | |||
| different when processing an HTTP response; see Section 6. | different when processing an HTTP response; see Section 7. | |||
| Unknown parameters, parameters with out-of-range values or values of | Unknown parameters, parameters with out-of-range values or values of | |||
| unexpected types MUST be ignored. | unexpected types MUST be ignored. | |||
| 3.1. Urgency | 3.1. Urgency | |||
| The urgency parameter ("u") takes an integer between 0 and 7, in | The urgency parameter ("u") takes an integer between 0 and 7, in | |||
| descending order of priority. This range provides sufficient | descending order of priority. This range provides sufficient | |||
| granularity for prioritizing responses for ordinary web browsing, at | granularity for prioritizing responses for ordinary web browsing, at | |||
| minimal complexity. | minimal complexity. | |||
| The value is encoded as an sh-integer. The default value is 3. | The value is encoded as an sf-integer. The default value is 3. | |||
| This parameter indicates the sender's recommendation, based on the | This parameter indicates the sender's recommendation, based on the | |||
| expectation that the server would transmit HTTP responses in the | expectation that the server would transmit HTTP responses in the | |||
| order of their urgency values if possible. The smaller the value, | order of their urgency values if possible. The smaller the value, | |||
| the higher the precedence. | 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 "0": | set to "0": | |||
| :method = GET | :method = GET | |||
| :scheme = https | :scheme = https | |||
| :authority = example.net | :authority = example.net | |||
| :path = /style.css | :path = /style.css | |||
| priority = u=0 | priority = u=0 | |||
| A client that fetches a document that likely consists of multiple | A client that fetches a document that likely consists of multiple | |||
| HTTP resources (e.g., HTML) SHOULD assign the default urgency level | HTTP resources (e.g., HTML) SHOULD assign the default urgency level | |||
| to the main resource. This convention allows servers to refine the | to the main resource. This convention allows servers to refine the | |||
| urgency using knowledge specific to the web-site (see Section 6). | urgency using knowledge specific to the web-site (see Section 7). | |||
| The lowest urgency level (7) is reserved for background tasks such as | The lowest urgency level (7) is reserved for background tasks such as | |||
| delivery of software updates. This urgency level SHOULD NOT be used | delivery of software updates. This urgency level SHOULD NOT be used | |||
| for fetching responses that have impact on user interaction. | for fetching responses that have impact on user interaction. | |||
| 3.2. Incremental | 3.2. Incremental | |||
| The incremental parameter ("i") takes an sh-boolean as the value that | The incremental parameter ("i") takes an sf-boolean as the value that | |||
| indicates if an HTTP response can be processed incrementally, i.e. | indicates if an HTTP response can be processed incrementally, i.e. | |||
| provide some meaningful output as chunks of the response arrive. | provide some meaningful output as chunks of the response arrive. | |||
| The default value of the incremental parameter is false ("0"). | The default value of the incremental parameter is false ("0"). | |||
| A server might distribute the bandwidth of a connection between | A server might distribute the bandwidth of a connection between | |||
| incremental responses that share the same urgency, hoping that | incremental responses that share the same urgency, hoping that | |||
| providing those responses in parallel would be more helpful to the | providing those responses in parallel would be more helpful to the | |||
| client than delivering the responses one by one. | client than delivering the responses one by one. | |||
| skipping to change at page 8, line 8 ¶ | skipping to change at page 8, line 21 ¶ | |||
| :method = GET | :method = GET | |||
| :scheme = https | :scheme = https | |||
| :authority = example.net | :authority = example.net | |||
| :path = /image.jpg | :path = /image.jpg | |||
| priority = u=5, i | priority = u=5, i | |||
| 3.3. Defining New Parameters | 3.3. Defining New Parameters | |||
| When attempting to extend priorities, care must be taken to ensure | When attempting to extend priorities, care must be taken to ensure | |||
| any use of existing parameters are either unchanged or modified in a | any use of existing parameters leaves them either unchanged or | |||
| way that is backwards compatible for peers that are unaware of the | modified in a way that is backwards compatible for peers that are | |||
| extended meaning. | unaware of the extended meaning. | |||
| For example, if there is a need to provide more granularity than | For example, if there is a need to provide more granularity than | |||
| eight urgency levels, it would be possible to subdivide the range | eight urgency levels, it would be possible to subdivide the range | |||
| using an additional parameter. Implementations that do not recognize | using an additional parameter. Implementations that do not recognize | |||
| the parameter can safely continue to use the less granular eight | the parameter can safely continue to use the less granular eight | |||
| levels. | levels. | |||
| Alternatively, the urgency can be augmented. For example, a | Alternatively, the urgency can be augmented. For example, a | |||
| graphical user agent could send a "visible" parameter to indicate if | graphical user agent could send a "visible" parameter to indicate if | |||
| the resource being requested is within the viewport. | the resource being requested is within the viewport. | |||
| 4. The Priority HTTP Header Field | 4. The Priority HTTP Header Field | |||
| The Priority HTTP header field can appear in requests and responses. | The Priority HTTP header field can appear in requests and responses. | |||
| A client uses it to specify the priority of the response. A server | 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 | uses it to inform the client that the priority was overwritten. An | |||
| intermediary can use the Priority information from client requests | intermediary can use the Priority information from client requests | |||
| and server responses to correct or amend the precedence to suit it | and server responses to correct or amend the precedence to suit it | |||
| (see Section 6). | (see Section 7). | |||
| The Priority header field is an end-to-end signal of the request | The Priority header field is an end-to-end signal of the request | |||
| priority from the client or the response priority from the server. | priority from the client or the response priority from the server. | |||
| As is the ordinary case for HTTP caching ([RFC7234]), a response with | As is the ordinary case for HTTP caching ([RFC7234]), a response with | |||
| a Priority header field might be cached and re-used for subsequent | a Priority header field might be cached and re-used for subsequent | |||
| requests. When an origin server generates the Priority response | requests. When an origin server generates the Priority response | |||
| header field based on properties of an HTTP request it receives, the | header field based on properties of an HTTP request it receives, the | |||
| server is expected to control the cacheability or the applicability | server is expected to control the cacheability or the applicability | |||
| of the cached response, by using header fields that control the | of the cached response, by using header fields that control the | |||
| caching behavior (e.g., Cache-Control, Vary). | caching behavior (e.g., Cache-Control, Vary). | |||
| An endpoint that fails to parse the Priority header field SHOULD use | ||||
| default parameter values. | ||||
| 5. Reprioritization | 5. Reprioritization | |||
| After a client sends a request, it may be beneficial to change the | After a client sends a request, it may be beneficial to change the | |||
| priority of the response. As an example, a web browser might issue a | priority of the response. As an example, a web browser might issue a | |||
| prefetch request for a JavaScript file with the urgency parameter of | prefetch request for a JavaScript file with the urgency parameter of | |||
| the Priority request header field set to "u=7" (background). Then, | the Priority request header field set to "u=7" (background). Then, | |||
| when the user navigates to a page which references the new JavaScript | when the user navigates to a page which references the new JavaScript | |||
| file, while the prefetch is in progress, the browser would send a | file, while the prefetch is in progress, the browser would send a | |||
| reprioritization frame with the priority field value set to "u=0". | reprioritization signal with the priority field value set to "u=0". | |||
| The PRIORITY_UPDATE frame (Section 6) can be used for such | ||||
| reprioritization. | ||||
| In HTTP/2 and HTTP/3, after a request message is sent on a stream, | 6. The PRIORITY_UPDATE Frame | |||
| the stream transitions to a state that prevents the client from | ||||
| sending additional frames on the stream. Therefore, a client cannot | ||||
| reprioritize a response by using the Priority header field. | ||||
| 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 for HTTP/2 | |||
| ([RFC7540]) and HTTP/3 ([I-D.ietf-quic-http]) which enables | ([RFC7540]) and HTTP/3 ([I-D.ietf-quic-http]). It carries priority | |||
| reprioritization. It carries updated priority parameters and | parameters and references the target of the prioritization based on a | |||
| references the target of the reprioritization based on a version- | version-specific identifier. In HTTP/2, this identifier is the | |||
| specific identifier; in HTTP/2 this is the Stream ID, in HTTP/3 this | Stream ID; in HTTP/3, the identifier is either the Stream ID or Push | |||
| is either the Stream ID or Push ID. | ID. Unlike the Priority header field, the PRIORITY_UPDATE frame is a | |||
| hop-by-hop signal. | ||||
| Unlike the header field, the reprioritization frame is a hop-by-hop | PRIORITY_UPDATE frames are sent by clients on the control stream, | |||
| signal. | allowing them to be sent independent from the stream that carries the | |||
| response. This means they can be used to reprioritize a response or | ||||
| a push stream; or signal the initial priority of a response instead | ||||
| of the Priority header field. | ||||
| 5.1. HTTP/2 PRIORITY_UPDATE Frame | A PRIORITY_UPDATE frame communicates a complete set of all parameters | |||
| in the Priority Field Value field. Omitting a parameter is a signal | ||||
| to use the parameter's default value. Failure to parse the Priority | ||||
| Field Value MUST be treated as a connection error. In HTTP/2 the | ||||
| error is of type PROTOCOL_ERROR; in HTTP/3 the error is of type | ||||
| H3_FRAME_ERROR. | ||||
| The HTTP/2 PRIORITY_UPDATE frame (type=0xF) carries the stream ID of | A client MAY send a PRIORITY_UPDATE frame before the stream that it | |||
| the response that is being reprioritized, and the updated priority in | references is open. Furthermore, HTTP/3 offers no guaranteed | |||
| ASCII text, using the same representation as that of the Priority | ordering across streams, which could cause the frame to be received | |||
| header field value. | earlier than intended. Either case leads to a race condition where a | |||
| server receives a PRIORITY_UPDATE frame that references a request | ||||
| stream that is yet to be opened. To solve this condition, for the | ||||
| purposes of scheduling, the most recently received PRIORITY_UPDATE | ||||
| frame can be considered as the most up-to-date information that | ||||
| overrides any other signal. Servers SHOULD buffer the most recently | ||||
| received PRIORITY_UPDATE frame and apply it once the referenced | ||||
| stream is opened. Holding PRIORITY_UPDATE frames for each stream | ||||
| requires server resources, which can can be bound by local | ||||
| implementation policy. (TODO: consider resolving #1261, and adding | ||||
| more text about bounds). Although there is no limit to the number | ||||
| PRIORITY_UPDATES that can be sent, storing only the most recently | ||||
| received frame limits resource commitment. | ||||
| 6.1. HTTP/2 PRIORITY_UPDATE Frame | ||||
| The HTTP/2 PRIORITY_UPDATE frame (type=0x10) is used by clients to | ||||
| signal the initial priority of a response, or to reprioritize a | ||||
| response or push stream. It carries the stream ID of the response | ||||
| and the priority in ASCII text, using the same representation as the | ||||
| Priority 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). Receiving a | |||
| PRIORITY_UPDATE frame with a field of any other value MUST be treated | ||||
| as a connection error of type PROTOCOL_ERROR. | ||||
| 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| Prioritized 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: | The PRIORITY_UPDATE frame payload has the following fields: | |||
| R: A reserved 1-bit field. The semantics of this bit are undefined, | 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 | and the bit MUST remain unset (0x0) when sending and MUST be | |||
| ignored when receiving. | ignored when receiving. | |||
| Stream ID: A 31-bit stream identifier for the stream that is the | Prioritized Stream ID: A 31-bit stream identifier for the stream | |||
| target of the priority update. | that is the target of the priority update. | |||
| Priority Field Value: The priority update value in ASCII text, | Priority Field Value: The priority update value in ASCII text, | |||
| encoded using Structured Headers. | encoded using Structured Fields. | |||
| The HTTP/2 PRIORITY_UPDATE frame MUST NOT be sent prior to opening | The Prioritized Stream ID MUST be within the stream limit. If a | |||
| the stream. If a PRIORITY_UPDATE is received prior to the stream | server receives a PRIORITY_UPDATE with a Prioritized Stream ID that | |||
| being opened, it MAY be treated as a connection error of type | is beyond the stream limits, this SHOULD be treated as a connection | |||
| error of type PROTOCOL_ERROR. | ||||
| If a PRIORITY_UPDATE frame is received with a Prioritized Stream ID | ||||
| of 0x0, the recipient MUST respond with a connection error of type | ||||
| PROTOCOL_ERROR. | PROTOCOL_ERROR. | |||
| TODO: add more description of how to handle things like receiving | If a client receives a PRIORITY_UPDATE frame, it MUST respond with a | |||
| PRIORITY_UPDATE on wrong stream, a PRIORITY_UPDATE with an invalid | connection error of type PROTOCOL_ERROR. | |||
| ID, etc. | ||||
| 5.2. HTTP/3 PRIORITY_UPDATE Frame | 6.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=0xF0700 or 0xF0701) is used by | |||
| the element that is being reprioritized, and the updated priority in | clients to signal the initial priority of a response, or to | |||
| reprioritize a response or push stream. It carries the identifier of | ||||
| the element that is being prioritized, 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. PRIORITY_UPDATE with a frame type of 0xF0700 is | |||
| used for request streams, while PRIORITY_UPDATE with a frame type of | ||||
| 0xF0701 is used for push streams. | ||||
| The PRIORITY_UPDATE frame MUST be sent on the control stream | The PRIORITY_UPDATE frame MUST be sent on the client control stream | |||
| ([I-D.ietf-quic-http], Section 6.2.1). | ([I-D.ietf-quic-http], Section 6.2.1). Receiving a PRIORITY_UPDATE | |||
| frame on a stream other than the client control stream MUST be | ||||
| treated as a connection error of type H3_FRAME_UNEXPECTED. | ||||
| 0 1 2 3 | HTTP/3 PRIORITY_UPDATE Frame { | |||
| 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 | Type (i) = 0xF0700..0xF0701, | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Length (i), | |||
| |T| Empty | Prioritized Element ID (i) ... | Prioritized Element ID (i), | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Priority Field Value (..), | |||
| | Priority Field Value (*) ... | } | |||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| Figure 2: HTTP/3 PRIORITY_UPDATE Frame Payload | Figure 2: HTTP/3 PRIORITY_UPDATE Frame | |||
| The PRIORITY_UPDATE frame payload has the following fields: | The PRIORITY_UPDATE frame payload has the following fields: | |||
| T (Prioritized Element Type): A one-bit field indicating the type of | ||||
| element being prioritized. A value of 0 indicates a | ||||
| reprioritization for a Request Stream, so the Prioritized Element | ||||
| ID is interpreted as a Stream ID. A value of 1 indicates a | ||||
| reprioritization for a Push stream, so the Prioritized Element ID | ||||
| is interpreted as a Push ID. | ||||
| Empty: A seven-bit field that has no semantic value. | ||||
| Prioritized Element ID: The stream ID or push ID that is the target | Prioritized Element ID: The stream ID or push ID that is the target | |||
| of the priority update. | of the priority update. | |||
| Priority Field Value: The priority update value in ASCII text, | Priority Field Value: The priority update value in ASCII text, | |||
| encoded using Structured Headers. | encoded using Structured Fields. | |||
| The HTTP/3 PRIORITY_UPDATE frame MUST NOT be sent with an invalid | The request-stream variant of PRIORITY_UPDATE (type=0xF0700) MUST | |||
| identifier, including before the request stream has been opened or | reference a request stream. If a server receives a PRIORITY_UPDATE | |||
| before a promised request has been received. If a server receives a | (type=0xF0700) for a Stream ID that is not a request stream, this | |||
| PRIORITY_UPDATE specifying a push ID that has not been promised, it | MUST be treated as a connection error of type H3_ID_ERROR. The | |||
| SHOULD be treated as a connection error of type H3_ID_ERROR. | Stream ID MUST be within the client-initiated bidirectional stream | |||
| limit. If a server receives a PRIORITY_UPDATE (type=0xF0700) with a | ||||
| Stream ID that is beyond the stream limits, this SHOULD be treated as | ||||
| a connection error of type H3_ID_ERROR. | ||||
| Because the HTTP/3 PRIORITY_UPDATE frame is sent on the control | The push-stream variant PRIORITY_UPDATE (type=0xF0701) MUST reference | |||
| stream and there are no ordering guarantees between streams, a client | a promised push stream. If a server receives a PRIORITY_UPDATE | |||
| that reprioritizes a request before receiving the response data might | (type=0xF0701) with a Push ID that is greater than the maximum Push | |||
| cause the server to receive a PRIORITY_UPDATE for an unknown request. | ID or which has not yet been promised, this MUST be treated as a | |||
| If the request stream ID is within bidirectional stream limits, the | connection error of type H3_ID_ERROR. | |||
| 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 | PRIORITY_UPDATE frames of either type are only sent by clients. If a | |||
| PRIORITY_UPDATE on wrong stream, a PRIORITY_UPDATE with an invalid | client receives a PRIORITY_UPDATE frame, this MUST be treated as a | |||
| ID, etc. | connection error of type H3_FRAME_UNEXPECTED. | |||
| 6. Merging Client- and Server-Driven Parameters | 7. 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. The server | of how the HTTP responses deserve to be prioritized. The server | |||
| might have additional information that can be combined with the | might have additional information that can be combined with the | |||
| client's indicated priority in order to improve the prioritization of | client's indicated priority in order to improve the prioritization of | |||
| the response. For example, use of an HTML document might depend | the response. For example, use of an HTML document might depend | |||
| heavily on one of the inline images; existence of such dependencies | heavily on one of the inline images; existence of such dependencies | |||
| is typically best known to the server. Or, a server that receives | is typically best known to the server. Or, a server that receives | |||
| requests for a font [RFC8081] and images with the same urgency might | requests for a font [RFC8081] and images with the same urgency might | |||
| give higher precedence to the font, so that a visual client can | give higher precedence to the font, so that a visual client can | |||
| skipping to change at page 12, line 8 ¶ | skipping to change at page 13, line 4 ¶ | |||
| Absence of a priority parameter in an HTTP response indicates the | Absence of a priority parameter in an HTTP response indicates the | |||
| server's disinterest in changing the client-provided value. This is | server's disinterest in changing the client-provided value. This is | |||
| different from the logic being defined for the request header field, | different from the logic being defined for the request header field, | |||
| in which omission of a priority parameter implies the use of their | in which omission of a priority parameter implies the use of their | |||
| default values (see Section 3). | default values (see Section 3). | |||
| As a non-normative example, when the client sends an HTTP request | As a non-normative example, when the client sends an HTTP request | |||
| with the urgency parameter set to "5" and the incremental parameter | with the urgency parameter set to "5" and the incremental parameter | |||
| set to "true" | set to "true" | |||
| :method = GET | :method = GET | |||
| :scheme = https | :scheme = https | |||
| :authority = example.net | :authority = example.net | |||
| :path = /menu.png | :path = /menu.png | |||
| priority = u=5, i | priority = u=5, i | |||
| and the origin responds with | and the origin responds with | |||
| :status = 200 | :status = 200 | |||
| content-type = image/png | content-type = image/png | |||
| priority = u=1 | priority = u=1 | |||
| the intermediary might alter its understanding of the urgency from | the intermediary might alter its understanding of the urgency from | |||
| "5" to "1", because it prefers the server-provided value over the | "5" to "1", because it prefers the server-provided value over the | |||
| client's. The incremental value continues to be "true", the value | client's. The incremental value continues to be "true", the value | |||
| specified by the client, as the server did not specify the | specified by the client, as the server did not specify the | |||
| incremental("i") parameter. | incremental("i") parameter. | |||
| 7. Client Scheduling | 8. Client Scheduling | |||
| A client MAY use priority values to make local scheduling choices | A client MAY use priority values to make local processing or | |||
| about the requests it initiates. | scheduling choices about the requests it initiates. | |||
| 8. Fairness | 9. Server Scheduling | |||
| Priority signals are input to a prioritization process. They do not | ||||
| guarantee any particular processing or transmission order for one | ||||
| response relative to any other response. An endpoint cannot force a | ||||
| peer to process concurrent request in a particular order using | ||||
| priority. Expressing priority is therefore only a suggestion. | ||||
| A server can use priority signals along with other inputs to make | ||||
| scheduling decisions. No guidance is provided about how this can or | ||||
| should be done. Factors such as implementation choices or deployment | ||||
| environment also play a role. Any given connection is likely to have | ||||
| many dynamic permutations. For these reasons, there is no unilateral | ||||
| perfect scheduler and this document only provides some basic | ||||
| recommendations for implementations. | ||||
| Clients cannot depend on particular treatment based on priority | ||||
| signals. Servers can use other information to prioritize responses. | ||||
| It is RECOMMENDED that, when possible, servers respect the urgency | ||||
| parameter (Section 3.1), sending higher urgency responses before | ||||
| lower urgency responses. | ||||
| It is RECOMMENDED that, when possible, servers respect the | ||||
| incremental parameter (Section 3.2). Non-incremental responses of | ||||
| the same urgency SHOULD be served one-by-one based on the Stream ID, | ||||
| which corresponds to the order in which clients make requests. Doing | ||||
| so ensures that clients can use request ordering to influence | ||||
| response order. Incremental responses of the same urgency SHOULD be | ||||
| served in round-robin manner. | ||||
| The incremental parameter indicates how a client processes response | ||||
| bytes as they arrive. Non-incremental resources are only used when | ||||
| all of the response payload has been received. Incremental resources | ||||
| are used as parts, or chunks, of the response payload are received. | ||||
| Therefore, the timing of response data reception at the client, such | ||||
| as the time to early bytes or the time to receive the entire payload, | ||||
| plays an important role in perceived performance. Timings depend on | ||||
| resource size but this scheme provides no explicit guidance about how | ||||
| a server should use size as an input to prioritization. Instead, the | ||||
| following examples demonstrate how a server that strictly abides the | ||||
| scheduling guidance based on urgency and request generation order | ||||
| could find that early requests prevent serving of later requests. | ||||
| 1. At the same urgency level, a non-incremental request for a large | ||||
| resource followed by an incremental request for a small resource. | ||||
| 2. At the same urgency level, an incremental request of | ||||
| indeterminate length followed by a non-incremental large | ||||
| resource. | ||||
| It is RECOMMENDED that servers avoid such starvation where possible. | ||||
| The method to do so is an implementation decision. For example, a | ||||
| server might pre-emptively send responses of a particular incremental | ||||
| type based on other information such as content size. | ||||
| 10. Fairness | ||||
| As a general guideline, a server SHOULD NOT use priority information | As a general guideline, a server SHOULD NOT use priority information | |||
| for making schedule decisions across multiple connections, unless it | for making schedule decisions across multiple connections, unless it | |||
| knows that those connections originate from the same client. Due to | knows that those connections originate from the same client. Due to | |||
| this, priority information conveyed over a non-coalesced HTTP | this, priority information conveyed over a non-coalesced HTTP | |||
| connection (e.g., HTTP/1.1) might go unused. | connection (e.g., HTTP/1.1) might go unused. | |||
| The remainder of this section discusses scenarios where unfairness is | The remainder of this section discusses scenarios where unfairness is | |||
| problematic and presents possible mitigations, or where unfairness is | problematic and presents possible mitigations, or where unfairness is | |||
| desirable. | desirable. | |||
| TODO: Discuss if we should add a signal that mitigates this issue. | TODO: Discuss if we should add a signal that mitigates this issue. | |||
| For example, we might add a SETTINGS parameter that indicates the | For example, we might add a SETTINGS parameter that indicates the | |||
| next hop that the connection is NOT coalesced (see | next hop that the connection is NOT coalesced (see | |||
| https://github.com/kazuho/draft-kazuho-httpbis-priority/issues/99). | https://github.com/kazuho/draft-kazuho-httpbis-priority/issues/99). | |||
| 8.1. Coalescing Intermediaries | 10.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 user agent 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, a server could use | |||
| a request that is known to have come through an intermediary, the | knowledge about the intermediary as another signal in its | |||
| server SHOULD prioritize the response as if it was assigned the | prioritization decisions. For instance, if a server knows the | |||
| priority of "u=1, i" (i.e. round-robin) regardless of the value of | intermediary is coalescing requests, then it could serve the | |||
| the Priority header field being transmitted, unless the server knows | responses in round-robin manner. This can work if the constrained | |||
| the intermediary is not coalescing requests from multiple clients. | resource is network capacity between the intermediary and the user | |||
| agent, as the intermediary buffers responses and forwards the chunks | ||||
| based on the prioritization scheme it implements. | ||||
| 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 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) | |||
| Responding to requests coming through an intermediary in a round- | 10.2. HTTP/1.x Back Ends | |||
| robin manner works well when the network bottleneck exists between | ||||
| the intermediary and the end client, as the intermediary would be | ||||
| buffering the responses and then be forwarding the chunks of those | ||||
| buffered responses based on the prioritization scheme it implements. | ||||
| A sophisticated server MAY use a weighted round-robin reflecting the | ||||
| urgencies expressed in the requests, so that less urgent responses | ||||
| would receive less bandwidth in case the bottleneck exists between | ||||
| the server and the intermediary. | ||||
| 8.2. HTTP/1.x Back Ends | ||||
| It is common for CDN infrastructure to support different HTTP | It is common for CDN infrastructure to support different HTTP | |||
| versions on the front end and back end. For instance, the client- | versions on the front end and back end. For instance, the client- | |||
| facing edge might support HTTP/2 and HTTP/3 while communication to | facing edge might support HTTP/2 and HTTP/3 while communication to | |||
| back end servers is done using HTTP/1.1. Unlike with connection | back end servers is done using HTTP/1.1. Unlike with connection | |||
| coalescing, the CDN will "de-mux" requests into discrete connections | 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 | to the back end. As HTTP/1.1 and older do not provide a way to | |||
| concurrently transmit multiple responses, there is no immediate | concurrently transmit multiple responses, there is no immediate | |||
| fairness issue in protocol. However, back end servers MAY still use | fairness issue in protocol. However, back end servers MAY still use | |||
| client headers for request scheduling. Back end servers SHOULD only | client headers for request scheduling. Back end servers SHOULD only | |||
| schedule based on client priority information where that information | schedule based on client priority information where that information | |||
| can be scoped to individual end clients. Authentication and other | can be scoped to individual end clients. Authentication and other | |||
| session information might provide this linkability. | session information might provide this linkability. | |||
| 8.3. Intentional Introduction of Unfairness | 10.3. Intentional Introduction of Unfairness | |||
| It is sometimes beneficial to deprioritize the transmission of one | It is sometimes beneficial to deprioritize the transmission of one | |||
| connection over others, knowing that doing so introduces a certain | connection over others, knowing that doing so introduces a certain | |||
| amount of unfairness between the connections and therefore between | amount of unfairness between the connections and therefore between | |||
| the requests served on those connections. | the requests served on those connections. | |||
| For example, a server might use a scavenging congestion controller on | For example, a server might use a scavenging congestion controller on | |||
| connections that only convey background priority responses such as | connections that only convey background priority responses such as | |||
| software update images. Doing so improves responsiveness of other | software update images. Doing so improves responsiveness of other | |||
| connections at the cost of delaying the delivery of updates. | connections at the cost of delaying the delivery of updates. | |||
| 9. Why use an End-to-End Header Field? | 11. 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 | |||
| client processes a response is a property associated to that client | client processes a response is a property associated to that client | |||
| generating that request. Not that of an intermediary. Therefore, it | generating that request. Not that of an intermediary. Therefore, it | |||
| is an end-to-end property. How these end-to-end properties carried | is an end-to-end property. How these end-to-end properties carried | |||
| skipping to change at page 15, line 5 ¶ | skipping to change at page 16, line 42 ¶ | |||
| for caching intermediaries. Such intermediaries can cache the value | for caching intermediaries. Such intermediaries can cache the value | |||
| of the Priority header field along with the response, and utilize the | of the Priority header field along with the response, and utilize the | |||
| value of the cached header field when serving the cached response, | value of the cached header field when serving the cached response, | |||
| only because the header field is defined as end-to-end rather than | only because the header field is defined as end-to-end rather than | |||
| hop-by-hop. | hop-by-hop. | |||
| It should also be noted that the use of a header field carrying a | It should also be noted that the use of a header field carrying a | |||
| textual value makes the prioritization scheme extensible; see the | textual value makes the prioritization scheme extensible; see the | |||
| discussion below. | discussion below. | |||
| 10. Security Considerations | 12. Security Considerations | |||
| [CVE-2019-9513] aka "Resource Loop", is a DoS attack based on | [CVE-2019-9513] aka "Resource Loop", is a DoS attack based on | |||
| manipulation of the HTTP/2 priority tree. Extensible priorities does | manipulation of the HTTP/2 priority tree. Extensible priorities does | |||
| not use stream dependencies, which mitigates this vulnerability. | not use stream dependencies, which mitigates this vulnerability. | |||
| TBD: depending on the outcome of reprioritization discussions, | TBD: depending on the outcome of reprioritization discussions, | |||
| following paragraphs may change or be removed. | following paragraphs may change or be removed. | |||
| [RFC7540], Section 5.3.4 describes a scenario where closure of | [RFC7540], Section 5.3.4 describes a scenario where closure of | |||
| streams in the priority tree could cause suboptimal prioritization. | streams in the priority tree could cause suboptimal prioritization. | |||
| skipping to change at page 15, line 42 ¶ | skipping to change at page 17, line 31 ¶ | |||
| state. This state can be limited by adopting the guidance about | state. This state can be limited by adopting the guidance about | |||
| concurrency limits described above. Extensible priorities is subject | concurrency limits described above. Extensible priorities is subject | |||
| to a similar consideration because PRIORITY_UPDATE frames may arrive | to a similar consideration because PRIORITY_UPDATE frames may arrive | |||
| before the request that they reference. A server is required to | before the request that they reference. A server is required to | |||
| store the information in order to apply the most up-to-date signal to | store the information in order to apply the most up-to-date signal to | |||
| the request. However, HTTP/3 implementations might have practical | the request. However, HTTP/3 implementations might have practical | |||
| barriers to determining reasonable stream concurrency limits | barriers to determining reasonable stream concurrency limits | |||
| depending on the information that is available to them from the QUIC | depending on the information that is available to them from the QUIC | |||
| transport layer. TODO: so what can we suggest? | transport layer. TODO: so what can we suggest? | |||
| 11. IANA Considerations | 13. 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 | |||
| Status: standard | Status: standard | |||
| 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_DEPRECATE_HTTP2_PRIORITIES | Name: SETTINGS_DEPRECATE_HTTP2_PRIORITIES | |||
| skipping to change at page 16, line 14 ¶ | skipping to change at page 18, line 4 ¶ | |||
| 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_DEPRECATE_HTTP2_PRIORITIES | Name: SETTINGS_DEPRECATE_HTTP2_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]: | |||
| Frame Type: PRIORITY_UPDATE | Frame Type: PRIORITY_UPDATE | |||
| Code: 0xF | Code: 0x10 | |||
| Specification: This document | Specification: This document | |||
| 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: 0xF0700 and 0xF0701 | |||
| Specification: This document | Specification: This document | |||
| 12. References | 14. References | |||
| 12.1. Normative References | 14.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-29 (work in progress), | (HTTP/3)", draft-ietf-quic-http-31 (work in progress), | |||
| June 2020. | September 2020. | |||
| [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-29 (work | and Secure Transport", draft-ietf-quic-transport-31 (work | |||
| in progress), June 2020. | in progress), September 2020. | |||
| [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>. | |||
| [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>. | |||
| [STRUCTURED-HEADERS] | [STRUCTURED-FIELDS] | |||
| Nottingham, M. and P. Kamp, "Structured Field Values for | Nottingham, M. and P. Kamp, "Structured Field Values for | |||
| HTTP", draft-ietf-httpbis-header-structure-19 (work in | HTTP", draft-ietf-httpbis-header-structure-19 (work in | |||
| progress), June 2020. | progress), June 2020. | |||
| 12.2. Informative References | 14.2. Informative References | |||
| [CVE-2019-9513] | [CVE-2019-9513] | |||
| Common Vulnerabilities and Exposures, "CVE-2019-9513", | Common Vulnerabilities and Exposures, "CVE-2019-9513", | |||
| March 2019, <https://cve.mitre.org/cgi-bin/ | March 2019, <https://cve.mitre.org/cgi-bin/ | |||
| cvename.cgi?name=CVE-2019-9513>. | cvename.cgi?name=CVE-2019-9513>. | |||
| [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. | |||
| skipping to change at page 18, line 9 ¶ | skipping to change at page 19, line 45 ¶ | |||
| <https://www.rfc-editor.org/info/rfc7234>. | <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>. | |||
| 12.3. URIs | 14.3. URIs | |||
| [1] https://lists.w3.org/Archives/Public/ietf-http-wg/ | [1] https://lists.w3.org/Archives/Public/ietf-http-wg/ | |||
| [2] https://httpwg.org/ | [2] https://httpwg.org/ | |||
| [3] https://github.com/httpwg/http-extensions/labels/priorities | [3] https://github.com/httpwg/http-extensions/labels/priorities | |||
| [4] http://tools.ietf.org/agenda/83/slides/slides-83-httpbis-5.pdf | [4] http://tools.ietf.org/agenda/83/slides/slides-83-httpbis-5.pdf | |||
| [5] https://github.com/pmeenan/http3-prioritization-proposal | [5] https://github.com/pmeenan/http3-prioritization-proposal | |||
| skipping to change at page 18, line 46 ¶ | skipping to change at page 20, line 34 ¶ | |||
| 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-ietf-httpbis-priority-00 | B.1. Since draft-ietf-httpbis-priority-01 | |||
| o PRIORITY_UPDATE frame changes (#1096, #1079, #1167, #1262, #1267, | ||||
| #1271) | ||||
| o Add section to describe server scheduling considerations (#1215, | ||||
| #1232, #1266) | ||||
| o Remove specific instructions related to intermediary fairness | ||||
| (#1022, #1264) | ||||
| B.2. Since draft-ietf-httpbis-priority-00 | ||||
| o Move text around (#1217, #1218) | o Move text around (#1217, #1218) | |||
| o Editorial change to the default urgency. The value is 3, which | o Editorial change to the default urgency. The value is 3, which | |||
| was always the intent of previous changes. | was always the intent of previous changes. | |||
| B.2. Since draft-kazuho-httpbis-priority-04 | B.3. Since draft-kazuho-httpbis-priority-04 | |||
| o Minimize semantics of Urgency levels (#1023, #1026) | o Minimize semantics of Urgency levels (#1023, #1026) | |||
| o Reduce guidance about how intermediary implements merging priority | o Reduce guidance about how intermediary implements merging priority | |||
| signals (#1026) | signals (#1026) | |||
| o Remove mention of CDN-Loop (#1062) | o Remove mention of CDN-Loop (#1062) | |||
| o Editorial changes | o Editorial changes | |||
| o Make changes due to WG adoption | o Make changes due to WG adoption | |||
| o Removed outdated Consideration (#118) | o Removed outdated Consideration (#118) | |||
| B.3. Since draft-kazuho-httpbis-priority-03 | B.4. Since draft-kazuho-httpbis-priority-03 | |||
| o Changed numbering from "[-1,6]" to "[0,7]" (#78) | o Changed numbering from "[-1,6]" to "[0,7]" (#78) | |||
| o Replaced priority scheme negotiation with HTTP/2 priority | o Replaced priority scheme negotiation with HTTP/2 priority | |||
| deprecation (#100) | deprecation (#100) | |||
| o Shorten parameter names (#108) | o Shorten parameter names (#108) | |||
| o Expand on considerations (#105, #107, #109, #110, #111, #113) | o Expand on considerations (#105, #107, #109, #110, #111, #113) | |||
| B.4. Since draft-kazuho-httpbis-priority-02 | B.5. 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.5. Since draft-kazuho-httpbis-priority-01 | B.6. Since draft-kazuho-httpbis-priority-01 | |||
| o Explain how reprioritization might be supported. | o Explain how reprioritization might be supported. | |||
| B.6. Since draft-kazuho-httpbis-priority-00 | B.7. 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. 72 change blocks. | ||||
| 176 lines changed or deleted | 271 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/ | ||||