From 848518b57b64beaba0fb70152188e984524bcc6f Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 14 May 2019 21:26:03 -0400 Subject: [PATCH 01/15] HTTP/3 with strict priorities --- draft-ietf-quic-http.md | 179 +++++++++++++++------------------------- 1 file changed, 65 insertions(+), 114 deletions(-) diff --git a/draft-ietf-quic-http.md b/draft-ietf-quic-http.md index 9e0a7e9c69..9b71bf63d2 100644 --- a/draft-ietf-quic-http.md +++ b/draft-ietf-quic-http.md @@ -508,46 +508,48 @@ HEADERS frames can only be sent on request / push streams. The PRIORITY (type=0x2) frame specifies the client-advised priority of a request, server push or placeholder. -A PRIORITY frame identifies an element to prioritize, and an element upon which -it depends. A Prioritized ID or Dependency ID identifies a client-initiated -request using the corresponding stream ID, a server push using a Push ID (see -{{frame-push-promise}}), or a placeholder using a Placeholder ID (see -{{placeholders}}). +A PRIORITY frame identifies an element to prioritize, and a placeholder upon +which it depends or the root if no placeholder is specified. A Prioritized +ID identifies a server push using a Push ID (see {{frame-push-promise}}), +or a placeholder using a Placeholder ID (see {{placeholders}}). When a client initiates a request, a PRIORITY frame MAY be sent as the first frame of the stream, creating a dependency on an existing element. In order to ensure that prioritization is processed in a consistent order, any subsequent -PRIORITY frames for that request MUST be sent on the control stream. A -PRIORITY frame received after other frames on a request stream MUST be treated -as a connection error of type HTTP_UNEXPECTED_FRAME. +PRIORITY frames for that request MUST be sent on the request stream. -If, by the time a new request stream is opened, its priority information -has already been received via the control stream, the PRIORITY frame -sent on the request stream MUST be ignored. +Placeholder and server push streams can only be prioritized on the control +stream. ~~~~~~~~~~ drawing 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -|PT |DT | Empty | [Prioritized Element ID (i)] ... +|P|D|W|P| Empty | [Prioritized Element ID (i)] ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -| [Element Dependency ID (i)] ... +| [Placeholder ID (i)] ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -| Weight (8) | -+-+-+-+-+-+-+-+-+ +| [Weight (8)] | [Priority (8)]| ++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~~~~~~~~~~ {: #fig-priority title="PRIORITY frame payload"} The PRIORITY frame payload has the following fields: - PT (Prioritized Element Type): - : A two-bit field indicating the type of element being prioritized (see + P (Prioritized Element Type): + : A one-bit field indicating the type of element being prioritized (see {{prioritized-element-types}}). When sent on a request stream, this MUST be - set to `11`. When sent on the control stream, this MUST NOT be set to `11`. + set to `0`. + + D (Dependent On Placeholder): + : A one-bit field indicating whether a element depends upon a placeholder + or the root of the tree (see {{element-dependency-types}}). - DT (Element Dependency Type): - : A two-bit field indicating the type of element being depended on (see - {{element-dependency-types}}). + W (Weight Indication): + : A one-bit field indicating whether an 8-bit weight value is present. + + P (Priority Indication): + : A one-bit field indicating whether an 8-bit strict priority is present. Empty: : A four-bit field which MUST be zero when sent and has no semantic value on @@ -555,45 +557,44 @@ The PRIORITY frame payload has the following fields: Prioritized Element ID: : A variable-length integer that identifies the element being prioritized. - Depending on the value of Prioritized Type, this contains the Stream ID of a - request stream, the Push ID of a promised resource, a Placeholder ID of a - placeholder, or is absent. + The Push ID of a promised resource, a Placeholder ID of a placeholder, + or is absent if sent on the request stream. Element Dependency ID: - : A variable-length integer that identifies the element on which a dependency - is being expressed. Depending on the value of Dependency Type, this contains - the Stream ID of a request stream, the Push ID of a promised resource, the - Placeholder ID of a placeholder, or is absent. For details of - dependencies, see {{priority}} and {{!RFC7540}}, Section 5.3. + : A variable-length integer that identifies the Placeholder ID on which a + dependency is being expressed, or is absent. For details of dependencies, + see {{priority}} and {{!RFC7540}}, Section 5.3. Weight: - : An unsigned 8-bit integer representing a priority weight for the prioritized - element (see {{!RFC7540}}, Section 5.3). Add one to the value to obtain a - weight between 1 and 256. + : An optional unsigned 8-bit integer representing a priority weight for the + prioritized element (see {{!RFC7540}}, Section 5.3). Add one to the value + to obtain a weight between 1 and 256. When absent, this value is 16. + + Priority: + : An optional unsigned 8-bit integer representing a strict priority for the + prioritized element (see {{!RFC7540}}, Section 5.3). When absent, this + value is 16. + The values for the Prioritized Element Type ({{prioritized-element-types}}) and Element Dependency Type ({{element-dependency-types}}) imply the interpretation of the associated Element ID fields. -| PT Bits | Type Description | Prioritized Element ID Contents | -| ------- | ---------------- | ------------------------------- | -| 00 | Request stream | Stream ID | -| 01 | Push stream | Push ID | -| 10 | Placeholder | Placeholder ID | -| 11 | Current stream | Absent | +| P Bit | Type Description | Prioritized Element ID Contents | +| ----- | ---------------- | ------------------------------- | +| 0 | Current stream | Absent | +| 0 | Push stream | Push ID | +| 1 | Placeholder | Placeholder ID | {: #prioritized-element-types title="Prioritized Element Types"} -| DT Bits | Type Description | Element Dependency ID Contents | -| ------- | ---------------- | ------------------------------ | -| 00 | Request stream | Stream ID | -| 01 | Push stream | Push ID | -| 10 | Placeholder | Placeholder ID | -| 11 | Root of the tree | Absent | +| D Bit | Type Description | Placeholder ID Contents | +| ------ | ---------------- | ----------------------- | +| 0 | Root of the tree | Absent | +| 1 | Placeholder | Placeholder ID | {: #element-dependency-types title="Element Dependency Types"} Note that unlike in {{!RFC7540}}, the root of the tree cannot be referenced -using a Stream ID of 0, as in QUIC stream 0 carries a valid HTTP request. The -root of the tree cannot be reprioritized. +using 0, so the root of the tree cannot be reprioritized. The PRIORITY frame can express relationships which might not be permitted based on the stream on which it is sent or its position in the stream. These @@ -601,20 +602,14 @@ situations MUST be treated as a connection error of type HTTP_MALFORMED_FRAME. The following situations are examples of invalid PRIORITY frames: - A PRIORITY frame sent on a request stream with the Prioritized Element Type - set to any value other than `11` -- A PRIORITY frame sent on a request stream which expresses a dependency on a - request with a greater Stream ID than the current stream -- A PRIORITY frame sent on a control stream with the Prioritized Element Type - set to `11` -- A PRIORITY frame which claims to reference a request, but the associated ID - does not identify a client-initiated bidirectional stream + set to any value other than `0` A PRIORITY frame with Empty bits not set to zero MAY be treated as a connection error of type HTTP_MALFORMED_FRAME. -A PRIORITY frame that references a non-existent Push ID, a Placeholder ID -greater than the server's limit, or a Stream ID the client is not yet permitted -to open MUST be treated as a connection error of type HTTP_LIMIT_EXCEEDED. +A PRIORITY frame that references a non-existent Push ID or a Placeholder ID +greater than the server's limit MUST be treated as a connection error of type +HTTP_LIMIT_EXCEEDED. A PRIORITY frame received on any stream other than a request or control stream MUST be treated as a connection error of type HTTP_WRONG_STREAM. @@ -1099,31 +1094,28 @@ the RST bit set if it detects an error with the stream or the QUIC connection. ## Prioritization {#priority} HTTP/3 uses a priority scheme similar to that described in {{!RFC7540}}, Section -5.3. In this priority scheme, a given element can be designated as dependent -upon another element. This information is expressed in the PRIORITY frame -{{frame-priority}} which identifies the element and the dependency. The elements -that can be prioritized are: +5.3, but replaces streams depending upon streams with placeholders and strict +priorities. In this priority scheme, a given element can be designated as dependent +upon a placeholder or the root. This information is expressed in the PRIORITY +frame {{frame-priority}} which identifies the element and the dependency. The +elements that can be prioritized are: -- Requests, identified by the ID of the request stream +- Requests, identified by the stream of the PRIORITY frame - Pushes, identified by the Push ID of the promised resource ({{frame-push-promise}}) - Placeholders, identified by a Placeholder ID Taken together, the dependencies across all prioritized elements in a connection -form a dependency tree. An element can depend on another element or on the root -of the tree. A reference to an element which is no longer in the tree is treated -as a reference to the root of the tree. The structure of the dependency tree -changes as PRIORITY frames modify the dependency links between prioritized -elements. - -Due to reordering between streams, an element can also be prioritized which is -not yet in the tree. Such elements are added to the tree with the requested -priority. +form a dependency tree. An element can only depend on a placeholder or on the root +of the tree. Because the root and placeholders never disappear, it is impoossible +to reference an element which is no longer in the tree. The structure of the +dependency tree changes as PRIORITY frames modify the dependency links between +prioritized elements. When a prioritized element is first created, it has a default initial weight -of 16 and a default dependency. Requests and placeholders are dependent on the -root of the priority tree; pushes are dependent on the client request on which -the PUSH_PROMISE frame was sent. +of 16, priority of 16, and a default dependency. Requests and placeholders are +dependent on the root of the priority tree; pushes are dependent on the client +request on which the PUSH_PROMISE frame was sent. Requests may override the default initial values by including a PRIORITY frame (see {{frame-priority}}) at the beginning of the stream. These priorities @@ -1151,47 +1143,6 @@ of placeholders the server has permitted. Like streams, placeholders have priority information associated with them. -### Priority Tree Maintenance - -Because placeholders will be used to "root" any persistent structure of the tree -which the client cares about retaining, servers can aggressively prune inactive -regions from the priority tree. For prioritization purposes, a node in the tree -is considered "inactive" when the corresponding stream has been closed for at -least two round-trip times (using any reasonable estimate available on the -server). This delay helps mitigate race conditions where the server has pruned -a node the client believed was still active and used as a Stream Dependency. - -Specifically, the server MAY at any time: - -- Identify and discard branches of the tree containing only inactive nodes - (i.e. a node with only other inactive nodes as descendants, along with those - descendants) -- Identify and condense interior regions of the tree containing only inactive - nodes, allocating weight appropriately - -~~~~~~~~~~ drawing - x x x - | | | - P P P - / \ | | - I I ==> I ==> A - / \ | | - A I A A - | | - A A -~~~~~~~~~~ -{: #fig-pruning title="Example of Priority Tree Pruning"} - -In the example in {{fig-pruning}}, `P` represents a Placeholder, `A` represents -an active node, and `I` represents an inactive node. In the first step, the -server discards two inactive branches (each a single node). In the second step, -the server condenses an interior inactive node. Note that these transformations -will result in no change in the resources allocated to a particular active -stream. - -Clients SHOULD assume the server is actively performing such pruning and SHOULD -NOT declare a dependency on a stream it knows to have been closed. - ## Server Push HTTP/3 server push is similar to what is described in HTTP/2 {{!RFC7540}}, but From 378e81964260902fd69f5fc83dfe31e881463923 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 14 May 2019 21:54:43 -0400 Subject: [PATCH 02/15] Update draft-ietf-quic-http.md --- draft-ietf-quic-http.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/draft-ietf-quic-http.md b/draft-ietf-quic-http.md index 9b71bf63d2..be90925ff9 100644 --- a/draft-ietf-quic-http.md +++ b/draft-ietf-quic-http.md @@ -568,12 +568,14 @@ The PRIORITY frame payload has the following fields: Weight: : An optional unsigned 8-bit integer representing a priority weight for the prioritized element (see {{!RFC7540}}, Section 5.3). Add one to the value - to obtain a weight between 1 and 256. When absent, this value is 16. + to obtain a weight between 1 and 256. When absent, indicates the resource + should be delivered all at once or not at all. Priority: : An optional unsigned 8-bit integer representing a strict priority for the prioritized element (see {{!RFC7540}}, Section 5.3). When absent, this - value is 16. + value is 16. An element with a higher priority should be delivered before + an element of lower priority. The values for the Prioritized Element Type ({{prioritized-element-types}}) and @@ -1094,17 +1096,22 @@ the RST bit set if it detects an error with the stream or the QUIC connection. ## Prioritization {#priority} HTTP/3 uses a priority scheme similar to that described in {{!RFC7540}}, Section -5.3, but replaces streams depending upon streams with placeholders and strict -priorities. In this priority scheme, a given element can be designated as dependent -upon a placeholder or the root. This information is expressed in the PRIORITY -frame {{frame-priority}} which identifies the element and the dependency. The -elements that can be prioritized are: +5.3, but replaces streams depending upon streams with strict priorities and +placeholders. In the HTTP/3 priority scheme, a given element can be designated +as dependent upon a placeholder or the root. This information is expressed in +the PRIORITY frame {{frame-priority}} which identifies the element and the +dependency. The elements that can be prioritized are: - Requests, identified by the stream of the PRIORITY frame - Pushes, identified by the Push ID of the promised resource ({{frame-push-promise}}) - Placeholders, identified by a Placeholder ID +In HTTP/3 stream dependencies which implicitly encode strict priorities by +explicit strict prioritization. This simplifies priority tree management, +eliminates race conditions introduced by HTTP/3's multiple streams, and improves +framing efficiency in the case of a large number of streams. + Taken together, the dependencies across all prioritized elements in a connection form a dependency tree. An element can only depend on a placeholder or on the root of the tree. Because the root and placeholders never disappear, it is impoossible From d7d4dee132b87dd2e4db4827808c8bfade118cc2 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 14 May 2019 21:56:32 -0400 Subject: [PATCH 03/15] Update draft-ietf-quic-http.md --- draft-ietf-quic-http.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/draft-ietf-quic-http.md b/draft-ietf-quic-http.md index be90925ff9..76d2cae134 100644 --- a/draft-ietf-quic-http.md +++ b/draft-ietf-quic-http.md @@ -508,8 +508,8 @@ HEADERS frames can only be sent on request / push streams. The PRIORITY (type=0x2) frame specifies the client-advised priority of a request, server push or placeholder. -A PRIORITY frame identifies an element to prioritize, and a placeholder upon -which it depends or the root if no placeholder is specified. A Prioritized +A PRIORITY frame identifies an element to prioritize and a placeholder upon +which it depends, or the root if no placeholder is specified. A Prioritized ID identifies a server push using a Push ID (see {{frame-push-promise}}), or a placeholder using a Placeholder ID (see {{placeholders}}). From 2308e69b108313f73ed8206d019c4830e71acfe7 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 14 May 2019 22:17:47 -0400 Subject: [PATCH 04/15] Update draft-ietf-quic-http.md --- draft-ietf-quic-http.md | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/draft-ietf-quic-http.md b/draft-ietf-quic-http.md index 76d2cae134..923a105a61 100644 --- a/draft-ietf-quic-http.md +++ b/draft-ietf-quic-http.md @@ -1097,27 +1097,23 @@ the RST bit set if it detects an error with the stream or the QUIC connection. HTTP/3 uses a priority scheme similar to that described in {{!RFC7540}}, Section 5.3, but replaces streams depending upon streams with strict priorities and -placeholders. In the HTTP/3 priority scheme, a given element can be designated -as dependent upon a placeholder or the root. This information is expressed in -the PRIORITY frame {{frame-priority}} which identifies the element and the -dependency. The elements that can be prioritized are: +placeholders. In the HTTP/3 priority scheme, a stream can be given a strict +priority or can be designated as dependent upon a placeholder or the root. +This information is expressed in the PRIORITY frame {{frame-priority}} which +identifies the element and the dependency. The elements that can be prioritized are: - Requests, identified by the stream of the PRIORITY frame - Pushes, identified by the Push ID of the promised resource ({{frame-push-promise}}) - Placeholders, identified by a Placeholder ID -In HTTP/3 stream dependencies which implicitly encode strict priorities by -explicit strict prioritization. This simplifies priority tree management, -eliminates race conditions introduced by HTTP/3's multiple streams, and improves -framing efficiency in the case of a large number of streams. - -Taken together, the dependencies across all prioritized elements in a connection -form a dependency tree. An element can only depend on a placeholder or on the root -of the tree. Because the root and placeholders never disappear, it is impoossible -to reference an element which is no longer in the tree. The structure of the -dependency tree changes as PRIORITY frames modify the dependency links between -prioritized elements. +In HTTP/3, stream dependencies implicitly encoded by dependencies in HTTP/2 are +explicitly encoded with strict prioritization. This simplifies priority tree +management, eliminates potential new race conditions introduced by HTTP/3's +multiple streams, and improves framing efficiency with more than 64 requests. + +When a placeholder is reparented or given a new weight or strict priority, all +dependent placeholders and streams are also re-prioritized. When a prioritized element is first created, it has a default initial weight of 16, priority of 16, and a default dependency. Requests and placeholders are From e933a980c660a0b42c7da711aa34f9c59d297fcd Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 14 May 2019 22:22:34 -0400 Subject: [PATCH 05/15] Update draft-ietf-quic-http.md --- draft-ietf-quic-http.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/draft-ietf-quic-http.md b/draft-ietf-quic-http.md index 923a105a61..105e43e25e 100644 --- a/draft-ietf-quic-http.md +++ b/draft-ietf-quic-http.md @@ -570,13 +570,13 @@ The PRIORITY frame payload has the following fields: prioritized element (see {{!RFC7540}}, Section 5.3). Add one to the value to obtain a weight between 1 and 256. When absent, indicates the resource should be delivered all at once or not at all. - + Priority: : An optional unsigned 8-bit integer representing a strict priority for the prioritized element (see {{!RFC7540}}, Section 5.3). When absent, this value is 16. An element with a higher priority should be delivered before an element of lower priority. - + The values for the Prioritized Element Type ({{prioritized-element-types}}) and Element Dependency Type ({{element-dependency-types}}) imply the interpretation From aa911b9972a0bf377a1ce3f6195f08bd39002b22 Mon Sep 17 00:00:00 2001 From: ianswett Date: Tue, 14 May 2019 22:27:28 -0400 Subject: [PATCH 06/15] Update draft-ietf-quic-http.md --- draft-ietf-quic-http.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/draft-ietf-quic-http.md b/draft-ietf-quic-http.md index 105e43e25e..5d8c2ec527 100644 --- a/draft-ietf-quic-http.md +++ b/draft-ietf-quic-http.md @@ -1107,9 +1107,9 @@ identifies the element and the dependency. The elements that can be prioritized ({{frame-push-promise}}) - Placeholders, identified by a Placeholder ID -In HTTP/3, stream dependencies implicitly encoded by dependencies in HTTP/2 are -explicitly encoded with strict prioritization. This simplifies priority tree -management, eliminates potential new race conditions introduced by HTTP/3's +In HTTP/3, stream dependencies that were implicitly encoded by dependencies in +HTTP/2 are explicitly encoded with strict prioritization. This simplifies priority +tree management, eliminates potential new race conditions introduced by HTTP/3's multiple streams, and improves framing efficiency with more than 64 requests. When a placeholder is reparented or given a new weight or strict priority, all From e94b1d9b030027fd572209657ff71cd9e4b3fae5 Mon Sep 17 00:00:00 2001 From: ianswett Date: Wed, 15 May 2019 12:08:47 -0400 Subject: [PATCH 07/15] Update draft-ietf-quic-http.md --- draft-ietf-quic-http.md | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/draft-ietf-quic-http.md b/draft-ietf-quic-http.md index 5d8c2ec527..6c9c5991f0 100644 --- a/draft-ietf-quic-http.md +++ b/draft-ietf-quic-http.md @@ -542,7 +542,7 @@ The PRIORITY frame payload has the following fields: set to `0`. D (Dependent On Placeholder): - : A one-bit field indicating whether a element depends upon a placeholder + : A one-bit field indicating whether an element depends upon a placeholder or the root of the tree (see {{element-dependency-types}}). W (Weight Indication): @@ -1100,7 +1100,8 @@ HTTP/3 uses a priority scheme similar to that described in {{!RFC7540}}, Section placeholders. In the HTTP/3 priority scheme, a stream can be given a strict priority or can be designated as dependent upon a placeholder or the root. This information is expressed in the PRIORITY frame {{frame-priority}} which -identifies the element and the dependency. The elements that can be prioritized are: +identifies the element and the dependency. The elements that can be prioritized +are: - Requests, identified by the stream of the PRIORITY frame - Pushes, identified by the Push ID of the promised resource @@ -1108,12 +1109,10 @@ identifies the element and the dependency. The elements that can be prioritized - Placeholders, identified by a Placeholder ID In HTTP/3, stream dependencies that were implicitly encoded by dependencies in -HTTP/2 are explicitly encoded with strict prioritization. This simplifies priority -tree management, eliminates potential new race conditions introduced by HTTP/3's -multiple streams, and improves framing efficiency with more than 64 requests. - -When a placeholder is reparented or given a new weight or strict priority, all -dependent placeholders and streams are also re-prioritized. +HTTP/2 are explicitly encoded with strict prioritization. This simplifies +priority tree management, eliminates potential new race conditions introduced +by HTTP/3's multiple streams, and improves framing efficiency with more than +64 requests. When a prioritized element is first created, it has a default initial weight of 16, priority of 16, and a default dependency. Requests and placeholders are @@ -1124,6 +1123,14 @@ Requests may override the default initial values by including a PRIORITY frame (see {{frame-priority}}) at the beginning of the stream. These priorities can be updated by sending a PRIORITY frame on the control stream. +Higher priority elements have all available data sent before elements of lower +priority. When multiple elements have the same priority, if a weight is +specified, elements with weights are interleaved. If a weight is not +specified, then elements are delivered sequentially and all available data +from one element is sent before any data from the next. If a given priority +level has some elements with weights and some without, the two groups share +the available bandwidth equally. + ### Placeholders In HTTP/2, certain implementations used closed or unused streams as placeholders @@ -1146,6 +1153,9 @@ of placeholders the server has permitted. Like streams, placeholders have priority information associated with them. +When a placeholder is reparented, given a new weight or given a new strict +priority, all dependent placeholders and streams are also re-prioritized. + ## Server Push HTTP/3 server push is similar to what is described in HTTP/2 {{!RFC7540}}, but From efce244c815708810a0ea291fb9e9ac43659f65c Mon Sep 17 00:00:00 2001 From: ianswett Date: Fri, 17 May 2019 09:33:08 -0400 Subject: [PATCH 08/15] Update draft-ietf-quic-http.md Co-Authored-By: Mike Bishop --- draft-ietf-quic-http.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-quic-http.md b/draft-ietf-quic-http.md index 6c9c5991f0..d2ccbb9737 100644 --- a/draft-ietf-quic-http.md +++ b/draft-ietf-quic-http.md @@ -1154,7 +1154,7 @@ of placeholders the server has permitted. Like streams, placeholders have priority information associated with them. When a placeholder is reparented, given a new weight or given a new strict -priority, all dependent placeholders and streams are also re-prioritized. +priority, the effective priority of all dependent placeholders and streams is impacted. ## Server Push From 62139b46ae04df91182e5176b7981d6cc6e6cbd5 Mon Sep 17 00:00:00 2001 From: ianswett Date: Fri, 17 May 2019 15:16:01 -0400 Subject: [PATCH 09/15] Change back to PT bits from a single P bit --- draft-ietf-quic-http.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/draft-ietf-quic-http.md b/draft-ietf-quic-http.md index d2ccbb9737..317d3674e1 100644 --- a/draft-ietf-quic-http.md +++ b/draft-ietf-quic-http.md @@ -525,7 +525,7 @@ stream. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -|P|D|W|P| Empty | [Prioritized Element ID (i)] ... +|PT |D|W|P| Empty | [Prioritized Element ID (i)] ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | [Placeholder ID (i)] ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ @@ -536,10 +536,10 @@ stream. The PRIORITY frame payload has the following fields: - P (Prioritized Element Type): + PT (Prioritized Element Type): : A one-bit field indicating the type of element being prioritized (see {{prioritized-element-types}}). When sent on a request stream, this MUST be - set to `0`. + set to `11`. D (Dependent On Placeholder): : A one-bit field indicating whether an element depends upon a placeholder @@ -557,8 +557,9 @@ The PRIORITY frame payload has the following fields: Prioritized Element ID: : A variable-length integer that identifies the element being prioritized. - The Push ID of a promised resource, a Placeholder ID of a placeholder, - or is absent if sent on the request stream. + Depending on the value of Prioritized Type, this contains the Stream ID of a + request stream, the Push ID of a promised resource, a Placeholder ID of a + placeholder, or is absent. Element Dependency ID: : A variable-length integer that identifies the Placeholder ID on which a @@ -582,11 +583,12 @@ The values for the Prioritized Element Type ({{prioritized-element-types}}) and Element Dependency Type ({{element-dependency-types}}) imply the interpretation of the associated Element ID fields. -| P Bit | Type Description | Prioritized Element ID Contents | -| ----- | ---------------- | ------------------------------- | -| 0 | Current stream | Absent | -| 0 | Push stream | Push ID | -| 1 | Placeholder | Placeholder ID | +| PT Bits | Type Description | Prioritized Element ID Contents | +| ------- | ---------------- | ------------------------------- | +| 00 | Request stream | Stream ID | +| 01 | Push stream | Push ID | +| 10 | Placeholder | Placeholder ID | +| 11 | Current stream | Absent | {: #prioritized-element-types title="Prioritized Element Types"} | D Bit | Type Description | Placeholder ID Contents | @@ -604,7 +606,9 @@ situations MUST be treated as a connection error of type HTTP_MALFORMED_FRAME. The following situations are examples of invalid PRIORITY frames: - A PRIORITY frame sent on a request stream with the Prioritized Element Type - set to any value other than `0` + set to any value other than `11` +- A PRIORITY frame sent on a control stream with the Prioritized Element Type + set to `11` A PRIORITY frame with Empty bits not set to zero MAY be treated as a connection error of type HTTP_MALFORMED_FRAME. From a9dab43cf5dbc3d94eff135f9ed86e999688a8f2 Mon Sep 17 00:00:00 2001 From: ianswett Date: Fri, 17 May 2019 15:18:55 -0400 Subject: [PATCH 10/15] Update draft-ietf-quic-http.md --- draft-ietf-quic-http.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/draft-ietf-quic-http.md b/draft-ietf-quic-http.md index 317d3674e1..ddcddd2153 100644 --- a/draft-ietf-quic-http.md +++ b/draft-ietf-quic-http.md @@ -510,8 +510,9 @@ request, server push or placeholder. A PRIORITY frame identifies an element to prioritize and a placeholder upon which it depends, or the root if no placeholder is specified. A Prioritized -ID identifies a server push using a Push ID (see {{frame-push-promise}}), -or a placeholder using a Placeholder ID (see {{placeholders}}). +ID identifies a client-initiated request using the corresponding stream ID, +a server push using a Push ID (see {{frame-push-promise}}), or a placeholder +using a Placeholder ID (see {{placeholders}}). When a client initiates a request, a PRIORITY frame MAY be sent as the first frame of the stream, creating a dependency on an existing element. In order to From 95ab2819ca5c28a2bf4e9d030cb306d5f82137a6 Mon Sep 17 00:00:00 2001 From: ianswett Date: Fri, 17 May 2019 15:20:51 -0400 Subject: [PATCH 11/15] Update draft-ietf-quic-http.md Missed revert from a previous commit. --- draft-ietf-quic-http.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/draft-ietf-quic-http.md b/draft-ietf-quic-http.md index ddcddd2153..4d819bd416 100644 --- a/draft-ietf-quic-http.md +++ b/draft-ietf-quic-http.md @@ -517,7 +517,9 @@ using a Placeholder ID (see {{placeholders}}). When a client initiates a request, a PRIORITY frame MAY be sent as the first frame of the stream, creating a dependency on an existing element. In order to ensure that prioritization is processed in a consistent order, any subsequent -PRIORITY frames for that request MUST be sent on the request stream. +PRIORITY frames for that request MUST be sent on the control stream. A PRIORITY +frame received after other frames on a request stream MUST be treated as a +connection error of type HTTP_UNEXPECTED_FRAME. Placeholder and server push streams can only be prioritized on the control stream. From c9e7dd6abdcf582826e8250481308f018ab7f304 Mon Sep 17 00:00:00 2001 From: ianswett Date: Fri, 17 May 2019 15:21:44 -0400 Subject: [PATCH 12/15] Update draft-ietf-quic-http.md --- draft-ietf-quic-http.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/draft-ietf-quic-http.md b/draft-ietf-quic-http.md index 4d819bd416..52c852d4e7 100644 --- a/draft-ietf-quic-http.md +++ b/draft-ietf-quic-http.md @@ -540,9 +540,9 @@ stream. The PRIORITY frame payload has the following fields: PT (Prioritized Element Type): - : A one-bit field indicating the type of element being prioritized (see + : A two-bit field indicating the type of element being prioritized (see {{prioritized-element-types}}). When sent on a request stream, this MUST be - set to `11`. + set to `11`. When sent on the control stream, this MUST NOT be set to `11`. D (Dependent On Placeholder): : A one-bit field indicating whether an element depends upon a placeholder From 0177e4ec25c14f9a30cf18ad908098cb77914831 Mon Sep 17 00:00:00 2001 From: ianswett Date: Fri, 17 May 2019 15:23:02 -0400 Subject: [PATCH 13/15] Update draft-ietf-quic-http.md --- draft-ietf-quic-http.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/draft-ietf-quic-http.md b/draft-ietf-quic-http.md index 52c852d4e7..a5922e3607 100644 --- a/draft-ietf-quic-http.md +++ b/draft-ietf-quic-http.md @@ -573,7 +573,8 @@ The PRIORITY frame payload has the following fields: : An optional unsigned 8-bit integer representing a priority weight for the prioritized element (see {{!RFC7540}}, Section 5.3). Add one to the value to obtain a weight between 1 and 256. When absent, indicates the resource - should be delivered all at once or not at all. + should be allocated the full available resources from its parent, as long + as it is able to make progress. Priority: : An optional unsigned 8-bit integer representing a strict priority for the From aaabebdefaf859c960424c0eed1957ef821f13ed Mon Sep 17 00:00:00 2001 From: ianswett Date: Fri, 17 May 2019 15:31:16 -0400 Subject: [PATCH 14/15] Update draft-ietf-quic-http.md --- draft-ietf-quic-http.md | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/draft-ietf-quic-http.md b/draft-ietf-quic-http.md index a5922e3607..5aea2596f5 100644 --- a/draft-ietf-quic-http.md +++ b/draft-ietf-quic-http.md @@ -1106,10 +1106,10 @@ the RST bit set if it detects an error with the stream or the QUIC connection. HTTP/3 uses a priority scheme similar to that described in {{!RFC7540}}, Section 5.3, but replaces streams depending upon streams with strict priorities and placeholders. In the HTTP/3 priority scheme, a stream can be given a strict -priority or can be designated as dependent upon a placeholder or the root. -This information is expressed in the PRIORITY frame {{frame-priority}} which -identifies the element and the dependency. The elements that can be prioritized -are: +priority with weights for equal priority elements, or can be designated as +dependent upon a placeholder or the root. This information is expressed in the +PRIORITY frame {{frame-priority}} which identifies the element and the +dependency. The elements that can be prioritized are: - Requests, identified by the stream of the PRIORITY frame - Pushes, identified by the Push ID of the promised resource @@ -1117,15 +1117,13 @@ are: - Placeholders, identified by a Placeholder ID In HTTP/3, stream dependencies that were implicitly encoded by dependencies in -HTTP/2 are explicitly encoded with strict prioritization. This simplifies -priority tree management, eliminates potential new race conditions introduced -by HTTP/3's multiple streams, and improves framing efficiency with more than -64 requests. +HTTP/2 are explicitly encoded with strict prioritization. When a prioritized element is first created, it has a default initial weight -of 16, priority of 16, and a default dependency. Requests and placeholders are -dependent on the root of the priority tree; pushes are dependent on the client -request on which the PUSH_PROMISE frame was sent. +of 0, priority of 16, and a default dependency. Requests and placeholders are +dependent on the root of the priority tree; pushes are dependent on the same +parent as the client request on which the PUSH_PROMISE frame was sent and given +a priority value one smaller than the request stream. Requests may override the default initial values by including a PRIORITY frame (see {{frame-priority}}) at the beginning of the stream. These priorities @@ -1133,11 +1131,11 @@ can be updated by sending a PRIORITY frame on the control stream. Higher priority elements have all available data sent before elements of lower priority. When multiple elements have the same priority, if a weight is -specified, elements with weights are interleaved. If a weight is not -specified, then elements are delivered sequentially and all available data -from one element is sent before any data from the next. If a given priority -level has some elements with weights and some without, the two groups share -the available bandwidth equally. +specified, elements with weights are interleaved. If a weight is 0, either +because it is the default weight or it was not specified, then elements are +delivered sequentially and all available data from one element is sent before +any data from the next. If a given priority level has some elements with +weights and some without, the two groups share the available bandwidth equally. ### Placeholders From 4124932b0f6d374fd9849d85e9c3c1ee9fe26e2d Mon Sep 17 00:00:00 2001 From: ianswett Date: Fri, 17 May 2019 19:15:56 -0400 Subject: [PATCH 15/15] Update draft-ietf-quic-http.md --- draft-ietf-quic-http.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/draft-ietf-quic-http.md b/draft-ietf-quic-http.md index 5aea2596f5..6cd06e35ef 100644 --- a/draft-ietf-quic-http.md +++ b/draft-ietf-quic-http.md @@ -1160,7 +1160,8 @@ of placeholders the server has permitted. Like streams, placeholders have priority information associated with them. When a placeholder is reparented, given a new weight or given a new strict -priority, the effective priority of all dependent placeholders and streams is impacted. +priority, the effective priority of all dependent placeholders and streams +is impacted. ## Server Push