Re: [hybi] hum #3: Message
Maciej Stachowiak <mjs@apple.com> Thu, 05 August 2010 19:04 UTC
Return-Path: <mjs@apple.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 0C7DE3A6937 for <hybi@core3.amsl.com>; Thu, 5 Aug 2010 12:04:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.522
X-Spam-Level:
X-Spam-Status: No, score=-106.522 tagged_above=-999 required=5 tests=[AWL=0.076, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vVT6I-e7YU6X for <hybi@core3.amsl.com>; Thu, 5 Aug 2010 12:04:22 -0700 (PDT)
Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 001E13A6900 for <hybi@ietf.org>; Thu, 5 Aug 2010 12:04:21 -0700 (PDT)
Received: from relay16.apple.com (relay16.apple.com [17.128.113.55]) by mail-out4.apple.com (Postfix) with ESMTP id DFF63A769A45 for <hybi@ietf.org>; Thu, 5 Aug 2010 12:04:52 -0700 (PDT)
X-AuditID: 11807137-b7c08ae00000377a-e7-4c5b0b54aede
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay16.apple.com (Apple SCV relay) with SMTP id B3.76.14202.45B0B5C4; Thu, 5 Aug 2010 12:04:52 -0700 (PDT)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_AI3DCawJSwxN1m0iuTptQA)"
Received: from [17.151.92.25] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0L6P00H461043110@gertie.apple.com> for hybi@ietf.org; Thu, 05 Aug 2010 12:04:52 -0700 (PDT)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <AANLkTik0kbh14s2JZARY2MFh0iNGV7H+B4Px4yG+wX44@mail.gmail.com>
Date: Thu, 05 Aug 2010 12:04:51 -0700
Message-id: <71BCE4BF-D3F6-4F94-BE76-306BDF6A2E67@apple.com>
References: <4C5AE93D.4040803@ericsson.com> <Pine.LNX.4.64.1008051758290.5947@ps20323.dreamhostps.com> <AANLkTik0kbh14s2JZARY2MFh0iNGV7H+B4Px4yG+wX44@mail.gmail.com>
To: John Tamplin <jat@google.com>
X-Mailer: Apple Mail (2.1081)
X-Brightmail-Tracker: AAAAAQAAAZE=
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] hum #3: Message
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Aug 2010 19:04:23 -0000
On Aug 5, 2010, at 11:42 AM, John Tamplin wrote: > On Thu, Aug 5, 2010 at 2:22 PM, Ian Hickson <ian@hixie.ch> wrote: > When transfering large blocks of data, chunking is quite inefficient. This > means that we'd need to make sure that the fixed width field is at least > long enough to handle large chunks of data. > > At terabit Ethernet speeds, 32 bits is not enough since you could transfer > that much in mere seconds, so presumably we'll use 64 bits. > > Do we really want a length that long? > > Let's assume the most recent proposal, which is a 4-byte header including a 2-byte length field. So, if you need to send a message of 2^32 bytes, it will be sent as a 65538 frames, incurring an overhead of 262152 bytes for header overhead, or a total of 4295229448 bytes with .0006% overhead over the payload data. It is true that this is higher overhead than a single large frame with a variable-length length field, but it hardly rises to "quite inefficient". Also, other reasons have been given for why you don't want to send a single frame that long anyway, and for why you don't want to have to keep an arbitrarily large buffer in the sender just so you can count the bytes of the entire message before you send it. In HTTP, it's common to send large entities with a length, even though a chunked encoding is available. In my experience, an explicit length is used much more often than chunked encoding, and I don't believe I've ever seen an HTTP message greater than 2^32 bytes in length sent with chunked transfer-encoding. Since both length up front and chunked encoding are available in HTTP, we can infer a revealed preference for explicit length for HTTP's use cases. What reason is there to believe that WebSocket will be different? Why would we make the common and preferred way to send large messages over HTTP completely unavailable in WebSocket? That strikes me as hubris. That being said, I think you're misunderstanding Ian's point. He expressed concern about the overhead for small messages to having a large fixed length, not the overhead to large messages of a chunked encoding. Regards, Maciej
- Re: [hybi] hum #3: Message Jamie Lokier
- [hybi] hum #3: Message Salvatore Loreto
- Re: [hybi] hum #3: Message Ian Hickson
- Re: [hybi] hum #3: Message John Tamplin
- Re: [hybi] hum #3: Message Douglas Otis
- Re: [hybi] hum #3: Message Maciej Stachowiak
- Re: [hybi] hum #3: Message Dave Cridland
- Re: [hybi] hum #3: Message Ian Hickson
- Re: [hybi] hum #3: Message Julian Reschke
- Re: [hybi] hum #3: Message John Tamplin
- Re: [hybi] hum #3: Message Jack Moffitt
- Re: [hybi] hum #3: Message Bjoern Hoehrmann
- Re: [hybi] hum #3: Message Willy Tarreau
- Re: [hybi] hum #3: Message Bjoern Hoehrmann
- Re: [hybi] hum #3: Message Maciej Stachowiak
- Re: [hybi] hum #3: Message Julian Reschke
- Re: [hybi] hum #3: Message Roberto Peon
- Re: [hybi] hum #3: Message Maciej Stachowiak
- Re: [hybi] hum #3: Message Jack Moffitt
- Re: [hybi] hum #3: Message Willy Tarreau
- Re: [hybi] hum #3: Message Maciej Stachowiak
- Re: [hybi] hum #3: Message Maciej Stachowiak
- Re: [hybi] hum #3: Message Dave Cridland
- Re: [hybi] hum #3: Message Maciej Stachowiak
- Re: [hybi] hum #3: Message Dave Cridland
- Re: [hybi] hum #3: Message Greg Wilkins
- Re: [hybi] hum #3: Message Dave Cridland
- Re: [hybi] hum #3: Message Jack Moffitt
- Re: [hybi] hum #3: Message Ian Fette (イアンフェッティ)
- Re: [hybi] hum #3: Message Ian Fette (イアンフェッティ)
- [hybi] Background info: Properties of sendfile() Jamie Lokier
- Re: [hybi] hum #3: Message Jamie Lokier
- Re: [hybi] Background info: Properties of sendfil… Roy T. Fielding
- Re: [hybi] Background info: Properties of sendfil… Jamie Lokier
- Re: [hybi] Background info: Properties of sendfil… Greg Wilkins
- Re: [hybi] Background info: Properties of sendfil… Roberto Peon
- Re: [hybi] hum #3: Message Scott Ferguson
- Re: [hybi] Background info: Properties of sendfil… Jamie Lokier
- Re: [hybi] Background info: Properties of sendfil… Greg Wilkins
- Re: [hybi] Background info: Properties of sendfil… Willy Tarreau
- Re: [hybi] Background info: Properties of sendfil… Maciej Stachowiak
- Re: [hybi] Background info: Properties of sendfil… Willy Tarreau
- Re: [hybi] hum #3: Message Pieter Hintjens
- Re: [hybi] hum #3: Message Arman Djusupov
- Re: [hybi] hum #3: Message Pieter Hintjens
- Re: [hybi] hum #3: Message Julian Reschke
- Re: [hybi] hum #3: Message Arman Djusupov
- Re: [hybi] Background info: Properties of sendfil… Jack Moffitt
- Re: [hybi] hum #3: Message John Tamplin
- Re: [hybi] hum #3: Message Arman Djusupov
- Re: [hybi] hum #3: Message Scott Ferguson
- Re: [hybi] hum #3: Message Scott Ferguson
- Re: [hybi] hum #3: Message Patrick McManus
- Re: [hybi] hum #3: Message Scott Ferguson
- Re: [hybi] hum #3: Message Patrick McManus
- Re: [hybi] Background info: Properties of sendfil… Roberto Peon
- Re: [hybi] Background info: Properties of sendfil… Jamie Lokier
- Re: [hybi] hum #3: Message Dave Cridland
- Re: [hybi] hum #3: Message Dave Cridland
- Re: [hybi] hum #3: Message Douglas Otis
- [hybi] Impact of mandatory chunking (was Re: Back… Maciej Stachowiak
- Re: [hybi] Impact of mandatory chunking (was Re: … Jack Moffitt
- Re: [hybi] hum #3: Message Pieter Hintjens
- Re: [hybi] Impact of mandatory chunking (was Re: … Maciej Stachowiak
- Re: [hybi] hum #3: Message Scott Ferguson
- Re: [hybi] hum #3: Message Willy Tarreau
- Re: [hybi] hum #3: Message Scott Ferguson
- Re: [hybi] hum #3: Message Roberto Peon
- Re: [hybi] hum #3: Message Willy Tarreau
- Re: [hybi] hum #3: Message Scott Ferguson
- Re: [hybi] hum #3: Message Pieter Hintjens
- Re: [hybi] hum #3: Message Greg Wilkins
- Re: [hybi] hum #3: Message Pieter Hintjens
- Re: [hybi] hum #3: Message Martin Sustrik
- Re: [hybi] hum(s) followup Maciej Stachowiak
- [hybi] hum(s) followup Salvatore Loreto
- Re: [hybi] hum(s) followup Pieter Hintjens
- Re: [hybi] hum(s) followup Salvatore Loreto