Re: Is a faithful HTTP/2 response scheduler necessarily O(n) in the worst case?

Amos Jeffries <squid3@treenet.co.nz> Thu, 26 January 2017 09:54 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 395DA129509 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 26 Jan 2017 01:54:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.119
X-Spam-Level:
X-Spam-Status: No, score=-10.119 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-3.199, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uX_7QQ8mzm3N for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 26 Jan 2017 01:54:55 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EB18A12950C for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 26 Jan 2017 01:54:54 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1cWgix-0002Su-Qj for ietf-http-wg-dist@listhub.w3.org; Thu, 26 Jan 2017 09:52:11 +0000
Resent-Date: Thu, 26 Jan 2017 09:52:11 +0000
Resent-Message-Id: <E1cWgix-0002Su-Qj@frink.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by frink.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <squid3@treenet.co.nz>) id 1cWgis-0002S9-Nw for ietf-http-wg@listhub.w3.org; Thu, 26 Jan 2017 09:52:06 +0000
Received: from [121.99.228.82] (helo=treenet.co.nz) by titan.w3.org with esmtp (Exim 4.84_2) (envelope-from <squid3@treenet.co.nz>) id 1cWgim-00080s-6y for ietf-http-wg@w3.org; Thu, 26 Jan 2017 09:52:01 +0000
Received: from [192.168.20.251] (unknown [121.98.40.15]) by treenet.co.nz (Postfix) with ESMTP id 99F51E6EBA for <ietf-http-wg@w3.org>; Thu, 26 Jan 2017 22:51:26 +1300 (NZDT)
To: ietf-http-wg@w3.org
References: <20170124.165356.870174430965764062.kazu@iij.ad.jp> <900A5D6B-0752-470E-840C-4518D933DD09@greenbytes.de> <CA+3+x5EdkLSAR2gWR9TT72o2Tg4Z_xKXMh8yVREYD7mvNuLB8w@mail.gmail.com> <20170125.075510.1795999132739277437.kazu@iij.ad.jp> <CA+3+x5HxOkJfEmurFgZCH1-BN2PswHZfsoA7cvksf5dgUbJEgA@mail.gmail.com> <CAOdDvNqCEHGN1tSxCmMPHECtrOMHe8_nE0HPDqK+VideuFNQow@mail.gmail.com>
From: Amos Jeffries <squid3@treenet.co.nz>
Message-ID: <ea1f6b49-1b4a-a370-9fc2-39f087221cc8@treenet.co.nz>
Date: Thu, 26 Jan 2017 22:51:18 +1300
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0
MIME-Version: 1.0
In-Reply-To: <CAOdDvNqCEHGN1tSxCmMPHECtrOMHe8_nE0HPDqK+VideuFNQow@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=121.99.228.82; envelope-from=squid3@treenet.co.nz; helo=treenet.co.nz
X-W3C-Hub-Spam-Status: No, score=-4.3
X-W3C-Hub-Spam-Report: AWL=-1.172, BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1cWgim-00080s-6y e9cd1e036143f9a89938d4ecc89d9344
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Is a faithful HTTP/2 response scheduler necessarily O(n) in the worst case?
Archived-At: <http://www.w3.org/mid/ea1f6b49-1b4a-a370-9fc2-39f087221cc8@treenet.co.nz>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/33381
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On 25/01/2017 12:20 p.m., Patrick McManus wrote:
> media frames are another really good use case for linear orders. These, and
> Tom's cases, were all cited as use cases during standardization.
> 

Gateways translating for HTTP/1 clients also need their responses to be
as linear as possible to match the 1.1 sequence. Otherwise they will be
forced to either spend RAM caching response data with a blocked
pipeline, or forgoe the h2 multiplexing and PUSH benefits.


> I think the discussion about how to process that organization is germane
> and interesting (chair hat!), and we should do that cognizant that this is
> an expected use of the priority feature.
> 
> On Wed, Jan 25, 2017 at 8:09 AM, Tom Bergan <tombergan@chromium.org> wrote:
> 
>> On Tue, Jan 24, 2017 at 2:55 PM, Kazu Yamamoto <kazu@iij.ad.jp> wrote:
>>
>>> Hi Tom,
>>>
>>>>> http://www.mew.org/~kazu/material/2015-http2-priority2.pdf
>>>>> http://www.mew.org/~kazu/doc/paper/http2-haskell-2016.pdf
>>>>
>>>> Thanks. IIUC, the algorithms described in both links are still at least
>>>> O(depth), which can be O(n) for dependency trees generated by certain
>>>> clients such as Chrome.
>>>
>>> Yes. Your understanding is correct.
>>>
>>> If a browser creates a list-like tree, I think it is misuse of priority.
>>> And servers should limit the depth of trees.
>>
>>
>> Why is that a misuse of priority? It seems entirely reasonable for a
>> client to specify a mostly-linear order. There is a very good reason for
>> this: inside HTML pages, CSS links and synchronous scripts must be
>> evaluated in the order they appear in the HTML file. This implies that the
>> server should send those resources in a linear order. This is exactly the
>> rationale behind Chrome using mostly-linear orders. (This is not to say
>> that mostly-linear orders are not occasionally problematic -- they are
>> <https://bugs.chromium.org/p/chromium/issues/detail?id=651538#c1> -- but
>> there are good reasons to linear orders at least some of the time.)
>>
>> (sorry for the duplicate message, replied from the wrong address)
>>
>