Re: [quicwg/base-drafts] create codec streams only when necessary (#2090)

Kazuho Oku <notifications@github.com> Wed, 19 December 2018 21:57 UTC

Return-Path: <bounces+848413-a050-quic-issues=ietf.org@sgmail.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 84503130EEA for <quic-issues@ietfa.amsl.com>; Wed, 19 Dec 2018 13:57:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.065
X-Spam-Level:
X-Spam-Status: No, score=-3.065 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.065, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_NONE=-0.0001, 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 jYPQ3ylyNjrF for <quic-issues@ietfa.amsl.com>; Wed, 19 Dec 2018 13:57:05 -0800 (PST)
Received: from o10.sgmail.github.com (o10.sgmail.github.com [167.89.101.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9BC3C130EDA for <quic-issues@ietf.org>; Wed, 19 Dec 2018 13:57:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com; h=from:reply-to:to:cc:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe; s=s20150108; bh=mV9mOB8aWESG5mnFljOHob4S8Tk=; b=Hkocgu1ft7pVupc0 P6v9VacQZuPl9K9VEOxxWWbp/OVcAsHKhCpDqbIZqSY+GxtGEPaPy4Lc7CJtOgm3 pHGnMMV4B8cP7MmE7dh7/AQ2btkWhw9PT3VMznvxkoPerV1Md64ZOYmr1TrkwlzN KNIJRCMA6O3syhvgUH4mtmi3qTU=
Received: by filter1326p1mdw1.sendgrid.net with SMTP id filter1326p1mdw1-20582-5C1ABEB0-12 2018-12-19 21:57:04.543205108 +0000 UTC m=+186951.831504778
Received: from github-lowworker-fc273f0.cp1-iad.github.net (unknown [192.30.252.33]) by ismtpd0016p1iad2.sendgrid.net (SG) with ESMTP id 9XNVT5FWRLO9N9WjGntAvA for <quic-issues@ietf.org>; Wed, 19 Dec 2018 21:57:04.497 +0000 (UTC)
Received: from github.com (localhost [127.0.0.1]) by github-lowworker-fc273f0.cp1-iad.github.net (Postfix) with ESMTP id 80B40C0D43 for <quic-issues@ietf.org>; Wed, 19 Dec 2018 13:57:04 -0800 (PST)
Date: Wed, 19 Dec 2018 21:57:04 +0000
From: Kazuho Oku <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4ab68e3221e936ba6ef86cd7e7fceae3ea229f07a7392cf00000001183280b092a169ce170ba08e@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/2090/c448758145@github.com>
In-Reply-To: <quicwg/base-drafts/pull/2090@github.com>
References: <quicwg/base-drafts/pull/2090@github.com>
Subject: Re: [quicwg/base-drafts] create codec streams only when necessary (#2090)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5c1abeb07f4ed_d583fc22d6d45b45923"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: kazuho
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
X-SG-EID: l64QuQ2uJCcEyUykJbxN122A6QRmEpucztpreh3Pak2/W2lBHrz1Tz+L/e/nv2gEHjl7CYtTwmfAdz 9VoLDWpTpNOtemcvbnxGbqpAYwbuVZSEBcppmfTobUkGXZIN4GPvnV6X9RNfTWHVvrb/JQiUVO5THW qgWtjvBP0IjFYczA7OuNVjioBYuRpj5oO4Www+2IlBvjIiRr+plZG+4d5N1HRJLZOSP8atT3wO4vNF U=
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/Fi8wDxYdk4sT_NfObxBAhAhgYzg>
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: Wed, 19 Dec 2018 21:57:09 -0000

@afrind 
> Per @kazuho's original problem statement:
> 
>> Avoiding creation them is beneficial for memory-constrained devices, because they can configure the QUIC transport stack to handle at most one unidirectional stream
> 
> Is anyone actually building a memory constrained implementation that would like to weigh in here? It strikes me as pretty simple to just receive a qpack unidirectional stream and discard it, or as @lnicco suggests, reset it.

Admittedly, I referred to the case of memory-constrained devices. However by reading the comments, I start to wonder if that is the only use-case that would suffer from the unnecessary creation of QPACK codec streams.

IIUC, the argument against mandating the lazy creation of QPACK codec streams is that the codec streams are very likely to be used, and that we should optimize for the majority. The logic itself sounds fine, but it's based on the premise that QPACK would be used for the entire lifetime of H3. If we are to start using an alternative to QPACK together with H3, every one of us would be handling the creation of QPACK codec streams that are useless.

H3 is the HTTP binding for the first non-TCP transport that is going to see lots of HTTP traffic. Considering how long we've been using TCP, it would be natural to assume (or hope) that H3's lifetime would span over multiple decades.

Compared to that, QPACK's lifetime might be shorter. It's not due to an issue in QPACK, but it's due to what's being compressed might change. The HTTP Working Group is working on [Structured Headers](https://tools.ietf.org/html/draft-ietf-httpbis-header-structure), that introduces structs and typed elements to the header fields. That changes how things can be compressed. Instead of compressing each header field, I'd assume that we'd be compressing each element of the header field (e.g., `stale-while-revalidate=YYY` would have it's own entry). We'd be compressing not only strings but also integers, booleans.

Should we be confined to develop the compression method for Structured Headers (and other changes that we might want to make in the future) as an extension to QPACK? I do not think we have enough information to make that decision.

To summarize, eager creation of QPACK codec streams could become unnecessary complexity not only for memory-constrained endpoints but for other endpoints as well. And I do not see why we need to ossify H3 in that way, considering the fact that the draft nevertheless requires endpoints to change the QPACK codec state when they receive SETTINGS (see [Mike's comment](
https://github.com/quicwg/base-drafts/pull/2090#pullrequestreview-181408669))

-- 
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/2090#issuecomment-448758145