Re: [quicwg/base-drafts] DATA frame encoding is inefficient for long dynamically generated bodies (#1885)

Kazuho Oku <notifications@github.com> Sat, 20 October 2018 10:55 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 581651294D0 for <quic-issues@ietfa.amsl.com>; Sat, 20 Oct 2018 03:55:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.064
X-Spam-Level:
X-Spam-Status: No, score=-8.064 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.064, 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_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 RZR9iMsNvEti for <quic-issues@ietfa.amsl.com>; Sat, 20 Oct 2018 03:55:38 -0700 (PDT)
Received: from out-2.smtp.github.com (out-2.smtp.github.com [192.30.252.193]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C05441292F1 for <quic-issues@ietf.org>; Sat, 20 Oct 2018 03:55:38 -0700 (PDT)
Date: Sat, 20 Oct 2018 03:55:37 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1540032937; bh=AosqxuWvUErsPyGW4T5BAampNbrhruJEM8A2U/jme6M=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=bb7Dy34G29r+z0e5DiI27oRlkWpsHzx4OEOH1SZRwOJu2y0M7dOVXHfbhdKzyWoiM c5709XX1yTVTHVpYz0fWsK79Pl+WvJws6wRnmR+mbX3U+6OG07X7XxaRVnZ0eQ0WAv 7qCsVIefWg3pYtEVSfCuGTTQ983GnP0fQvH6J9Fk=
From: Kazuho Oku <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+0166e4abe6f00fb7c66abda983242fe43cbbb4f7f4d4ef5892cf0000000117e2cba992a169ce16286866@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/issues/1885/431570158@github.com>
In-Reply-To: <quicwg/base-drafts/issues/1885@github.com>
References: <quicwg/base-drafts/issues/1885@github.com>
Subject: Re: [quicwg/base-drafts] DATA frame encoding is inefficient for long dynamically generated bodies (#1885)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5bcb09a9a5019_36e83ff84fcd45c4195789"; 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
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/_Dc-jFMivaMPQOR75VT08eCz_T0>
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: Sat, 20 Oct 2018 10:55:40 -0000

@dtikhonov 
> Isn't this as simple as foregoing the initial size check and closing the connection if you do hit the internal limit?

You also need to handle EOS differently. In the bounded frame case, seeing EOS before consuming the entire frame is a protocol error. In the non-bounded case, seeing it is a non-error.

To generalize, allowing the use of EOS as a terminator for non-DATA frames introduces new complexity to *some* decoders. OTOH, allowing that does not simplify on the encoder side, because you need the code to emit such frames in the middle of the stream.

This is very different from DATA frames:
* For many HQ stacks, DATA would be the last frame to be emitted on a stream. Therefore, you can get rid of the code that emits bounded DATA frames if we introduce the use of EOS as a terminator.
* It does not make the decoder complex, because in practice no decoder will block until it receives an entire DATA frame.
* DATA will be the most frequently used frame (compared to nothing else). Therefore, it is beneficial to reduce the number of the frames (by allowing use of EOS as the terminator).

-- 
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/1885#issuecomment-431570158