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

James M Snell <jasnell@gmail.com> Thu, 09 May 2013 00:15 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 6E69921F8F4D for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 8 May 2013 17:15:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.574
X-Spam-Level:
X-Spam-Status: No, score=-10.574 tagged_above=-999 required=5 tests=[AWL=0.025, 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 ubwjJ1JWfVzh for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 8 May 2013 17:14:59 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 11E0E21F8F2C for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 8 May 2013 17:14:58 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UaEUL-0005a6-Hf for ietf-http-wg-dist@listhub.w3.org; Thu, 09 May 2013 00:13:37 +0000
Resent-Date: Thu, 09 May 2013 00:13:37 +0000
Resent-Message-Id: <E1UaEUL-0005a6-Hf@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1UaEU9-0005Yx-6g for ietf-http-wg@listhub.w3.org; Thu, 09 May 2013 00:13:25 +0000
Received: from mail-ob0-f181.google.com ([209.85.214.181]) by lisa.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <jasnell@gmail.com>) id 1UaEU8-0006RI-Ei for ietf-http-wg@w3.org; Thu, 09 May 2013 00:13:25 +0000
Received: by mail-ob0-f181.google.com with SMTP id ta14so2373439obb.12 for <ietf-http-wg@w3.org>; Wed, 08 May 2013 17:12:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:from:date:message-id:subject:to:cc :content-type; bh=jP6OLBXjzU6yVBRdr46l2dWAaodRShN/dlVAbj3O6u8=; b=U8iXBPkKqp12aGObExX1OrVy0DfTwNUwD57zvBricYIJN67DWeiVbcGpsINhZp6U0g hEQbjL6z/PT8M1m4mSnvlIozjA4e/UbMj4SGU9xTMe5ZqG0bioobAOOBPeJCQBiJrrJF IOKMyt4en4OwNXdHUfnBEGBTyll8660mmQe6vJ4ajimhMvmIeC5Y0/jaQ4PI1+BjLwOF 7NTsZzIOYNJDpMA+iDEB/wSQnlk8l7OsEvZWiATb3GX7r7QqCva3xn9EX60J/zz95f2K 8fVTnhsS6SuPzpiJHkvdgHhCDoxYMspMeGp8eXJnD+d0hGi8K/ClGpGw7SUrKqZiE5Zh i+hQ==
X-Received: by 10.60.42.135 with SMTP id o7mr2947751oel.97.1368058378393; Wed, 08 May 2013 17:12:58 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.60.3.137 with HTTP; Wed, 8 May 2013 17:12:38 -0700 (PDT)
From: James M Snell <jasnell@gmail.com>
Date: Wed, 08 May 2013 17:12:38 -0700
Message-ID: <CABP7RbcfTjN5QFFuGm-P-rQMpAR3FGSC58WCy3qKn+29YCjn+w@mail.gmail.com>
To: Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc: "William Chan (陈智昌)" <willchan@chromium.org>, Martin Thomson <martin.thomson@gmail.com>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=209.85.214.181; envelope-from=jasnell@gmail.com; helo=mail-ob0-f181.google.com
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-2.690, 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: lisa.w3.org 1UaEU8-0006RI-Ei 9a32619bd16c739df43872860dd748f9
X-Original-To: ietf-http-wg@w3.org
Subject: Proposal: New Frame Size Text (was: Re: Design Issue: Frame Size Items)
Archived-At: <http://www.w3.org/mid/CABP7RbcfTjN5QFFuGm-P-rQMpAR3FGSC58WCy3qKn+29YCjn+w@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17902
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>

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.
...

- James



On Wed, May 8, 2013 at 1:56 PM, Poul-Henning Kamp <phk@phk.freebsd.dk> wrote:
> In message <CABP7Rbc8rs4-ktyGKwVxVC4MztcvYtARqBDoyEBYujfcpo4YDw@mail.gmail.com>
> , James M Snell writes:
>
>>Going back through this, here's a counter proposal:
>>
>>Let's get rid of the 8192 frame size rule and simply say that the
>>maximum size for all DATA, HEADERS, HEADERS+PRIORITY and PUSH_PROMISE
>>frames is either 65,535 or the current flow control WINDOW_SIZE,
>>whichever is less.
>
> Hmm, *now* you're talking...
>
> I like it.
>
> --
> Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
> phk@FreeBSD.ORG         | TCP/IP since RFC 956
> FreeBSD committer       | BSD since 4.3-tahoe
> Never attribute to malice what can adequately be explained by incompetence.