Re: [Editorial Errata Reported] RFC7540 (4871)

> On 30 Nov 2016, at 09:35, Martin Thomson <martin.thomson@gmail.com> wrote:
> 
> On 30 November 2016 at 19:41, Cory Benfield <cory@lukasa.co.uk> wrote:
>> What happens if both stream A and B are blocked? Should my server endeavour to serve dependent streams in that case?
> 
> I guess so.  You don't want to completely stall out.  Obviously, if A
> and B have a parent with siblings that aren't blocked, then you
> continue there, but if everything is stalled, then I guess it's OK to
> make progress on any stream.
> 
> You could probably devise some sort of scheme where you pick the
> stream using some algorithm or other - maybe based on some best-fit
> criteria.  But I'd say that it doesn't matter at that point: if we
> assume that all streams that aren't blocked depend on blocked streams,
> then none of them will be useful to the other side until those blocked
> streams finish.  All you are doing is avoiding having a completely
> wasted connection.

So presumably the sensible heuristic for this is to do the following logic:

1) Select the streams that depend on stream 0 that are not blocked, completed, or idle, and add them to set A.
2) For each stream dependent on stream 0 that is completed or idle,
    a) Select their children that are not blocked, completed or idle, adjusting their effective weights as detailed in RFC 7540, and add them to set A.
    b) If no streams were selected in part a), but there are streams that are completed or idle streams, repeat step 2) for the children of those streams.
3) If set A is empty, repeat the above but treat streams that are blocked as though they are completed or idle (that is, allow their children to be selected to be served).

I am not sure how many server/intermediary implementations actually implement priority in this manner. It’d be interesting to hear what the others do.

Cory

Received on Wednesday, 30 November 2016 12:50:22 UTC