Re: [quicwg/base-drafts] Why are there two ways of associating push with requests? (#3275)

Ryan Hamilton <notifications@github.com> Tue, 03 December 2019 16:07 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 8E9E31200A1 for <quic-issues@ietfa.amsl.com>; Tue, 3 Dec 2019 08:07:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8
X-Spam-Level:
X-Spam-Status: No, score=-8 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-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 B-QIqbjGEa19 for <quic-issues@ietfa.amsl.com>; Tue, 3 Dec 2019 08:07:49 -0800 (PST)
Received: from out-1.smtp.github.com (out-1.smtp.github.com [192.30.252.192]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 25ECC12006D for <quic-issues@ietf.org>; Tue, 3 Dec 2019 08:07:48 -0800 (PST)
Date: Tue, 03 Dec 2019 08:07:48 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1575389268; bh=sSxxCf1BERFCPmBc1Kvgv4+0IU9n2LG9RsiIprPyDj0=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=m6YXcxyxW+dManebdBWzK+U6VCbyZTbcUYCEBe8djf5Bknr8fTd7lRYBzLRjSAwEe dMc+XqMEzrbDgqRtqHnUcmyYrHFWWzFOxFftz3//lzrVj6mVAmvNHp1AxIUy7maP/5 jhHJLxdU5GWs7sSFfPoTb9GzD4Sg/fA/r3r4bUGE=
From: Ryan Hamilton <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+AFTOJKZHJR5J6O4MCOOBAW536O5NJEVBNHHB7DC6LI@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/issues/3275/561236987@github.com>
In-Reply-To: <quicwg/base-drafts/issues/3275@github.com>
References: <quicwg/base-drafts/issues/3275@github.com>
Subject: Re: [quicwg/base-drafts] Why are there two ways of associating push with requests? (#3275)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5de6885417466_6a033fb6260cd96c17802"; charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: RyanAtGoogle
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/SrGt8pRO-b79RO8g3636hDXkeT8>
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: Tue, 03 Dec 2019 16:07:52 -0000

> > Recall that in HTTP/2, the motivating use case for PUSH_PROMISE was the ability to promise more resources than the open stream limit would allow to be pushed. (Consider an image search in which the server wants to push a grid of 100 thumbnails when the open stream limit is 10).
> 
> Was that a feature or a bug? By my understanding, we've been attempting to fix that accounting loophole in HTTP/3.

It was definitely a feature! (Though the lack of *any* limit on the number of promised resources might have been a bug). In particular, the feature came into existence because, iirc, because Roberto tried to do a server push demo of exactly this use case (page of thumbnails) but it didn't work because the stream limits got in the way. After that, he proposed the push/promise distinction with the explicit intent of allowing more promises than pushes.
 
> Some of what is being discussed here is a retread of #2559 (in particular [#2559 (comment)](https://github.com/quicwg/base-drafts/issues/2559#issuecomment-476961392))

Agreed. To be clear, I rather like the explicit MAX_STREAMS signal. For bidirectional streams and web browsing, this seems to work out extremely nicely.

For server push, on the other hand, it's a non-obvious sharp edge, particular with respect to HTTP/2. (So at a minimum, I think we should provide guidance on how to push with HTTP/3 effectively)

> > However, in HTTP/3 this is not the case. The server will be unable to open a new push stream until it receives a new MAX_STREAMS from the client increasing the limit. But that burns an RTT. In which case, there's no point in pushing at all. So to avoid this, a client could increase the MAX_STREAMS to some sort of enormous value. But that does not behave like the HTTP/2 open stream limit.
> 
> I don't follow. The HTTP/2 behaviour seems to equate to constrained concurrent requests, and uncontrained pushes. Therefore, setting a sensible value for `MAX_STREAMS bidi` and an enormous value for `MAX_STREAMS uni` seems like what you want. 

Not quite. HTTP/2 provides unlimited *promises*, but limited concurrent *pushes* (via the open steams limit). HTTP/3 can limit promises via MAX_PUSH_ID, and limit concurrent pushed via MAX_STREAMS uni. So to replicate HTTP/2, and HTTP/3 client could try a huge MAX_PUSH_ID and a small MAX_STREAMS uni. That would have the same concurrent behavior as HTTP/2, but would run the risky of adding a 1-RTT delay for pushes above the MAX_STREAMS limit.

> Although I not convinced that is a feature.

That's a fair point. If so we should probably have guidance how managing MAX_PUSH_ID and MAX_STREAMS uni together to make this obvious. (Though at this point I'm coming around the to position of other folks in Chrome that push in general is rarely a performance win and typically a footgun and we should stop using it)
 
> > At a minimum we should probably provide advice about how the client should manage MAX_STREAMS and MAX_PUSH_ID
> 
> If you're trying to mimic the "push 100 tumbnails without an RTT" behaviour, you'll have to keep in mind the value of initial_max_stream_data_uni too.

Yes, flow control also comes into play for sure. (Thankfully that's not much different from HTTP/2). If a client's flow control limits are less than a BDP, the client is "gonna have a bad time" :) 

-- 
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/3275#issuecomment-561236987