Re: [quicwg/base-drafts] HTTP/3 Zero-weighting (#2723)

Robin Marx <notifications@github.com> Sun, 19 May 2019 10:30 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 EE30712006D for <quic-issues@ietfa.amsl.com>; Sun, 19 May 2019 03:30:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.01
X-Spam-Level:
X-Spam-Status: No, score=-3.01 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] 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 9xjJa96OjPJb for <quic-issues@ietfa.amsl.com>; Sun, 19 May 2019 03:30:19 -0700 (PDT)
Received: from out-22.smtp.github.com (out-22.smtp.github.com [192.30.252.205]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4A9DF12007A for <quic-issues@ietf.org>; Sun, 19 May 2019 03:30:19 -0700 (PDT)
Date: Sun, 19 May 2019 03:30:17 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1558261817; bh=Y7l6JO0s9gx6mo8NuoKndAvzCYdEVyoWSbjcsYJ9238=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=xjS5YMj7moftEgMB5z6U6i2Ygc8TF2J2ZfCkmXflQZNANy6QWHiH2zOHKe9lnGww+ 6xBmBit8alop6LNLFHHE4bu0GZ3TdVEbamNh1PANUxpgjbahaZt/SwdC245wCIIcb+ h6Wqwc237/cZl3abrYOPzdtAfcNZdQq9eKA6IkI8=
From: Robin Marx <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+AFTOJK2S7DISXEQNMQDLFP525ZRLTEVBNHHBVEEO5I@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/2723/c493745276@github.com>
In-Reply-To: <quicwg/base-drafts/pull/2723@github.com>
References: <quicwg/base-drafts/pull/2723@github.com>
Subject: Re: [quicwg/base-drafts] HTTP/3 Zero-weighting (#2723)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5ce13039e0ea1_3fdf3f9ee6ccd96c307654"; 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/Z7SqrFY7757Tcl7b0e-YaqegXvk>
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: Sun, 19 May 2019 10:30:23 -0000

Thank you all for the comments!


> Why not make zero take precedence over any weights and avoid the dumb error:
> As long as there are 0 weights the first such is served, then weighted entries. You could also call this infinity weight.

I considered this, but that would again introduce the need for a special case treatment of the default situation (e.g., the orphan placeholder). I feel that the "dumb error" is really quite dumb and should be quite rare, as you would need to specify a weight and add the node to a placeholder that also has zero-weighted streams attached to it for it to come into play. That type of error is not specific to this proposal and would always lead to weird behavior. I expect it more likely that people will just not use placeholders/weights at all, and we end up in the FCFS case.

> Sequentially sending both before and after non-zero weighted nodes could potentially be supported by hijacking weight 256 for sending sequentially after non-zero weighted nodes and using weight 0 for sending sequentially before non-zero weighted nodes.

That being said, I do really like the symmetry behind this approach. I would reverse the semantics you propose though: 255 takes precedence over everything, 0 is lowest priority. It adds a bit of extra complexity, but this might be worth it. I will try to make some example graphs for this too.

> The situation I would like to be able to cover is a page with several videos (or animated gifs) and a few async scripts. You want these videos to start playing asap and all together (before scripts load), but you do not want to wait till videos are completely downloaded to begin loading those async scripts (which should load serially).

If I understand your use case correctly, this is supported by adding 2 sibling placeholders (PH): 1 placeholder for the videos and 1 for the scripts. The video PH would for example get weight 60 and all videos are added to it with an (equal) weight so they get transferred in parallel. The script PH would get weight 30 and all scripts are added to it with weight 0 so they get transferred sequentially. The videos/scripts would then get about 2x as much bandwidth as the scripts (60 vs 30). 

This is normal HTTP/2 behaviour and supported by this proposal and #2700 and also the current HTTP/3 draft text. The main change for this proposal (and also #2700) is that you can add the scripts to the PH with weight 0 and they automatically are transferred sequentially. Without this, you would need to add a script to the previous script node (instead of the placeholder) to get the sequential behaviour. See both compared in the image below. 

 In the case of @pmeenan's proposal, iiuc, you would put scripts in concurrency 2 and videos in concurrency 1 and they would automatically share the bandwidth 50/50 (while here we can specify the weights in more detail). 

![2019-05-19 12_25_52](https://user-images.githubusercontent.com/2240689/57980888-5506b580-7a31-11e9-965d-faacc4b212ed.png)


> I do not like creating arbitrary priorities where none are warranted. Let the server pick its own priority, if it is all the same to the User Agent. For example, if there are multiple zero-weight children, the server may choose to deliver whatever object is fully available in memory rather than deliver 80% of an object with the lowest ID first and only then start sending the fully-available object.

This is a good point and of course still possible. The priorities in the HTTP/3 and HTTP/2 texts can perfectly be overridden by a server if it feels it has a better grasp on the situation. However, as I understand it, for HTTP/2 most (non-proxy) servers do not do custom logic and implement the spec and as such, the spec needs to have sensible defaults. 



-- 
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/pull/2723#issuecomment-493745276