Re: Proposal: New Frame Size Text (was: Re: Design Issue: Frame Size Items)

Martin Thomson <martin.thomson@gmail.com> Mon, 13 May 2013 21:34 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A9A4721F8610 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 13 May 2013 14:34:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.599
X-Spam-Level:
X-Spam-Status: No, score=-10.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9DQ2cyeu5Vje for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 13 May 2013 14:34:17 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 2259321F947C for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 13 May 2013 14:34:16 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1Uc0NM-0004XD-Vs for ietf-http-wg-dist@listhub.w3.org; Mon, 13 May 2013 21:33:45 +0000
Resent-Date: Mon, 13 May 2013 21:33:44 +0000
Resent-Message-Id: <E1Uc0NM-0004XD-Vs@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <martin.thomson@gmail.com>) id 1Uc0NA-0004Uo-TE for ietf-http-wg@listhub.w3.org; Mon, 13 May 2013 21:33:32 +0000
Received: from mail-wg0-f51.google.com ([74.125.82.51]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <martin.thomson@gmail.com>) id 1Uc0N8-0006zp-Hq for ietf-http-wg@w3.org; Mon, 13 May 2013 21:33:32 +0000
Received: by mail-wg0-f51.google.com with SMTP id b13so6588532wgh.18 for <ietf-http-wg@w3.org>; Mon, 13 May 2013 14:33:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=2GpzRWmL1wrnwhbelFooT5ri1EHomArppao3QajKs7A=; b=FSve2WlLuVR1zOifp5g50PMc4isFPYWpI4llNVLXAd0XwkDzpHteOjrqJci8PtL/Q1 dGa9EOvvLcb81PDQiqNfSPGOeTvrc/EeDXd+l/lc5xmXHw8+qwarw0B23FwxDs8DCd2m 2iz/ts9PgRw8q2hcqL6JrtREL8ex2ADW4Aakfvvp3LinPmypu7mSEMfeQqkDmu+3rpSg 1AUf9qZBkxY1MrmTyOHoncoXB5AtoG4j55QYPkU+OtUD/XZaYFS0h62M/JW5rvRZ5qUA eaqaa56IHaqgks3R6VlQQZ9YgXPoEGVVFFiW77CSSeMKK3mNywJefwYgxIl4kRo14wT+ wpKg==
MIME-Version: 1.0
X-Received: by 10.180.89.170 with SMTP id bp10mr89699wib.26.1368480784458; Mon, 13 May 2013 14:33:04 -0700 (PDT)
Received: by 10.194.33.102 with HTTP; Mon, 13 May 2013 14:33:04 -0700 (PDT)
In-Reply-To: <CABP7RbcfTjN5QFFuGm-P-rQMpAR3FGSC58WCy3qKn+29YCjn+w@mail.gmail.com>
References: <CABP7RbcfTjN5QFFuGm-P-rQMpAR3FGSC58WCy3qKn+29YCjn+w@mail.gmail.com>
Date: Mon, 13 May 2013 14:33:04 -0700
Message-ID: <CABkgnnWyVULO5r2boCpz23fTXezTogjmYLa25gwcT-9k4fxNzA@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: James M Snell <jasnell@gmail.com>
Cc: Poul-Henning Kamp <phk@phk.freebsd.dk>, =?UTF-8?B?V2lsbGlhbSBDaGFuICjpmYjmmbrmmIwp?= <willchan@chromium.org>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Type: text/plain; charset=UTF-8
Received-SPF: pass client-ip=74.125.82.51; envelope-from=martin.thomson@gmail.com; helo=mail-wg0-f51.google.com
X-W3C-Hub-Spam-Status: No, score=-4.4
X-W3C-Hub-Spam-Report: AWL=-1.738, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1Uc0N8-0006zp-Hq 7486e266554d415bbe6bf3f559ab469f
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Proposal: New Frame Size Text (was: Re: Design Issue: Frame Size Items)
Archived-At: <http://www.w3.org/mid/CABkgnnWyVULO5r2boCpz23fTXezTogjmYLa25gwcT-9k4fxNzA@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17977
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On 8 May 2013 17:12, James M Snell <jasnell@gmail.com> wrote:
> Suggested replacement text for the current "Frame Size" discussion in
> the spec...
>
> ...
>    While the flow control protocol and framing mechanisms defined by
> this specification are largely independent of one another, the flow
> control WINDOW_SIZE places an upper limit on the total amount of data
> an endpoint can send to a peer at any given time. DATA, HEADERS,
> HEADERS+PRIORITY and PUSH_PROMISE frame sizes MUST NOT exceed the
> current WINDOW_SIZE for the stream or connection and MUST NOT be
> greater than 65,535 bytes. The 8 bytes of the frame header are not
> counted toward this limit.
>
>    When a new connection is established, both endpoints are permitted
> to begin sending frames prior to the establishment of an initial flow
> control WINDOW_SIZE. Accordingly, there is a risk that an endpoint
> might initially send frames that are too large for the peer to handle.
> To mitigate this risk, it is RECOMMENDED that, until the initial
> WINDOW_SIZE is established, the total size of individual
> header-bearing frames not exceed the current TCP Maximum Segment Size
> (MSS) and that individual DATA frames are no larger than 4096 bytes.
> The 8-byte frame header is included in these limits.
>
> If an endpoint is unable to process a frame due to its size and the
> frame specifies any stream identifier field value other than 0x0, the
> endpoint MUST respond with a <xref target="StreamErrorHandler">stream
> error</xref> using the FRAME_TOO_LARGE error code. If the stream
> identifier field value is 0x0, the endpoint MUST send a <xref
> target="ConnectionErrorHandler">connection error</xref> using the
> FRAME_TOO_LARGE error code.
> ...

I think that there is good advice here, namely: don't send a frame
larger than the current window (actually, both of them) permits.

What bothers me is that this is the only control on frame size.  And
it's not a very good one.  Unless you are operating at the
teeny-window end of the flow control space, then you probably want a
wider open window than this.  And the commitment that processing a
frame of size X imposes is greater than the commitment that buffering
a frame of size X imposes.

I'm not sure that this solves the problem.  At least not all of it.