Re: [quicwg/base-drafts] PRIORITY frame on control stream referencing unopened request stream (#2502)

Robin Marx <notifications@github.com> Fri, 10 May 2019 10:48 UTC

Return-Path: <noreply@github.com>
X-Original-To: quic-issues@ietfa.amsl.com
Delivered-To: quic-issues@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1A483120072 for <quic-issues@ietfa.amsl.com>; Fri, 10 May 2019 03:48:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.009
X-Spam-Level:
X-Spam-Status: No, score=-3.009 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=github.com
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 U4GBKjPsg6qB for <quic-issues@ietfa.amsl.com>; Fri, 10 May 2019 03:48:51 -0700 (PDT)
Received: from out-17.smtp.github.com (out-17.smtp.github.com [192.30.252.200]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7AA31120026 for <quic-issues@ietf.org>; Fri, 10 May 2019 03:48:51 -0700 (PDT)
Date: Fri, 10 May 2019 03:48:50 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1557485330; bh=d/S2lBEXe0sie/WV1s81RE4Ftj54fRhGB3qReyjhWj4=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=m0jh7vTzrb/x9GLv/h5zsG0iixTS/Y664g+CHUvvx7f0EEsXRgTnjE4v34yfaUIEr jXqXFBsCdeG86AOEkdu9be+HpzkbW4fEfxChqM2BNNKo741lNs1H+1qg9vTJBlrptX PG9QaGZvQatNmYjtFAM7ywtaFvez2PmBv8qi3f0U=
From: Robin Marx <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+AFTOJK3S7J4WURFR7LFCA4524KEZFEVBNHHBR4DCTQ@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/issues/2502/491246513@github.com>
In-Reply-To: <quicwg/base-drafts/issues/2502@github.com>
References: <quicwg/base-drafts/issues/2502@github.com>
Subject: Re: [quicwg/base-drafts] PRIORITY frame on control stream referencing unopened request stream (#2502)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5cd5571289c5a_7c683fb57a6cd9688883c"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: rmarx
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/xYwN9svHRBY4NP1i-VFiLzud4oI>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.29
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic-issues/>
List-Post: <mailto:quic-issues@ietf.org>
List-Help: <mailto:quic-issues-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 10 May 2019 10:48:53 -0000

Again, thanks everyone for the interesting discussion and Pat for weighing in :) 

I've been thinking about it a bit more and have found that my earlier suggestion "add as direct child of the last added node (could be root) with weight 1" simply does not work... 

To make discussion easier, I've made a small diagram:
![exclusivity_problems](https://user-images.githubusercontent.com/2240689/57520389-d36ea380-731d-11e9-825a-106553366ef3.png)

In S5 you can see that such a scheme would create a circular dependency for a (short) time. 

I've been considering it further and these are possible options that do seem to work and might be better:
- Add as child to the root with weight 1 instead of 16
- Add as child to the "least important placeholder" with weight 1 (e.g., the placeholder receiving the least bandwidth) if there are placeholders, if not: fallback to root. (this assumes placeholders always remain and always have some path back up to the root)
- Add as child to the currently "most important resource" (resource receiving most bandwidth): non-optimal and can lead to weird situations, BUT at least prevents the most important resource from being interrupted (e.g., in the example, this would add the red node as child of the HTML, since that is the one getting the bandwidth). 

We could also do all three (first try placeholder, then try resource, then fall back to root). 
This could use a fair amount more of working out the edge cases though

---------------------------------------------------------------------------------------

Then, I took a step back and thought about: do we really need exclusive priorities? 
The main goal is to keep the option to daisy-chain resources. This is still possible today: just add as a child to another resource. 
What we miss with non-exclusivity is the option to then re-prioritize when a new, more important resource needs to be inserted in the daisy-chain (it cannot be injected somewhere in the middle as an only child, only as a sibling, see also the HIGHEST-subtree in P3 and P4 in the image below for a similar situation). 

As I understand it though, this re-prioritization is **not needed within similarly important resources** (e.g., CSS does not have to necessarily overtake Fonts, just images). 
Using that, I've tried to cobble together a new scheme that simulates Chrome's approach using what we have available today (see P2 in the image below): 
![exclusivity_light](https://user-images.githubusercontent.com/2240689/57521628-18480980-7321-11e9-8aa9-842d62744fc3.png)


This setup allows re-prioritization between the placeholders, but **not** within the same "importance bucket": less fine-grained than exclusive priorities, but quite workable. (e.g., in P4+5, CSS is discovered later, after the image. However, due to the placeholders, it can be added and is sent before the images, but NOT before the font, as was the case in HTTP/2's P3). 

Put differently: we cannot have P3, but at least P5 is not P4. 

---------------------------------------------------------------------------------------

In conclusion:
- Fairly small updates to the default behavior could give us most of the improvements we are looking for
- Daisy-chaining and re-prioritization (within a certain degree of granularity) is still possible in the current scheme







-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/2502#issuecomment-491246513