- From: Ilya Grigorik <igrigorik@gmail.com>
- Date: Wed, 1 Oct 2014 21:33:13 -0700
- To: Chad Austin <caustin@gmail.com>
- Cc: WHATWG <whatwg@whatwg.org>
On Wed, Oct 1, 2014 at 8:39 PM, Chad Austin <caustin@gmail.com> wrote: > Weight is actually not what I want. I want priority. They're different > concepts in that priority implies trumping and weight implies proportional > resource allocation. > > That is, if I make 10 high-priority requests, 20 medium-priority requests, > and 30 low-priority requests, I don't want ANY of the low-priority requests > to consume any resources until either 1) all higher-priority requests have > been serviced or 2) there are spare resources that cannot otherwise be used > for higher-priority requests. > And.. you've just defined a three-level deep dependency tree, with weights for resources within each group. > As you quoted, "Streams with the same parent SHOULD be allocated resources > proportionally based on their weight." Proportional allocation would be > incorrect for this use case. > Proportional within the same level of the tree, and based on assigned weights within that level. ig > > On Wed, Oct 1, 2014 at 8:19 PM, Ilya Grigorik <igrigorik@gmail.com> wrote: > >> >> On Wed, Oct 1, 2014 at 7:59 PM, Chad Austin <caustin@gmail.com> wrote: >> >>> I don't see a way to set a priority value in there. The specific >>> wording is "Streams can be prioritized by marking them as dependent on the, >>> completion of other streams". >>> >>> I see that a client can specify the weight of a stream and you can say >>> that a stream depends on another stream. Neither of those are what I >>> want. I simply want to specify priorities of a bunch of requests. How >>> would I do that in HTTP 2.0? >>> >> >> Weight is exactly what you want: >> http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-5.3.2 >> >> "A stream that is not dependent on any other stream is given a stream >> dependency of 0x0. In other words, the non-existent stream 0 forms >> the root of the tree." >> >> All dependent streams are allocated an integer weight between 1 to >> 256 (inclusive)... Streams with the same parent SHOULD be allocated >> resources >> proportionally based on their weight. " >> >> In other words, if you don't care about dependencies, then don't assign >> the parent. Doing so will make all streams children of the root of the tree >> (0x0), and from there you can use weights to assign relative priority. >> >> Hope that makes sense. >> >> ig >> >> >> >> > > > -- > Chad Austin > http://chadaustin.me >
Received on Thursday, 2 October 2014 04:34:18 UTC