Re: [hybi] max frame size, was: frame length encoding

Pieter Hintjens <ph@imatix.com> Sun, 22 August 2010 22:38 UTC

Return-Path: <pieterh@gmail.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 1D0953A6881 for <hybi@core3.amsl.com>; Sun, 22 Aug 2010 15:38:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.968
X-Spam-Level:
X-Spam-Status: No, score=-1.968 tagged_above=-999 required=5 tests=[AWL=0.009, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 twyxi2TSeDuo for <hybi@core3.amsl.com>; Sun, 22 Aug 2010 15:38:50 -0700 (PDT)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by core3.amsl.com (Postfix) with ESMTP id D98C83A6407 for <hybi@ietf.org>; Sun, 22 Aug 2010 15:38:49 -0700 (PDT)
Received: by vws10 with SMTP id 10so5122958vws.31 for <hybi@ietf.org>; Sun, 22 Aug 2010 15:39:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=ZppvkvPLzKyZI6U1FkxRVcDGysFOCiJMtbDsKDisxY8=; b=OgnU4YgZbqRTVnaK/LY9MQMhHXBR7ar4gMyTRUHzmk9B94MqKwhyE6zWLBI/+8z5oY 3BTCr4xxQu0KB+kSbFh2k+G10PtR5nXLTZDZKnkCPqbJ2vOeFwbuKBZgi6xLK2noYCdM 0GiPNV6XBU5FR+UrK9RI4ULXY8kmGYEHzKym0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=Npt+qCVMSFLMYTiwRLrKHXl6KB1T2ZZbi2y/yQwL6G/ySH15JcdPyvPxhawi6XvnVU dnjf5PlbkEFMiCLlEXjp88Nw3v2iJ6S2bKZSFT3D68RBBuJOUFg1AB+4oNhYMaMRRfzR MSqoZFcgCzhmnXpMiPkQtHN6TyIvILI2wJ4IM=
Received: by 10.220.161.200 with SMTP id s8mr2692004vcx.216.1282516763203; Sun, 22 Aug 2010 15:39:23 -0700 (PDT)
MIME-Version: 1.0
Sender: pieterh@gmail.com
Received: by 10.220.167.17 with HTTP; Sun, 22 Aug 2010 15:39:03 -0700 (PDT)
In-Reply-To: <4C71555D.9010600@gmx.de>
References: <AANLkTimKbmcpgx8k0uXUWvCO=8w9pPrtV=3y4qh6363k@mail.gmail.com> <alpine.DEB.2.00.1008212037190.27211@tvnag.unkk.fr> <AANLkTinrsT+wV48nHvVW_1ChGYffkq7jisU2-PZnMyKg@mail.gmail.com> <alpine.DEB.2.00.1008212123460.27211@tvnag.unkk.fr> <20ef7ed5e135c57c1ee5a741658b9d98.squirrel@sm.webmail.pair.com> <1282423311.2014.6.camel@tng> <224b9ed365bd78fd5e316b8cb5f3f837.squirrel@sm.webmail.pair.com> <1282435214.2014.14.camel@tng> <AANLkTimo0MwZEMn1t1vrASfwC1bx82Q9Z_Ls3wVb-zUS@mail.gmail.com> <AANLkTimQxo0d9TW+ApKLfWrSwutMYL4MJBVRWtxP1sC5@mail.gmail.com> <4C71555D.9010600@gmx.de>
From: Pieter Hintjens <ph@imatix.com>
Date: Mon, 23 Aug 2010 00:39:03 +0200
X-Google-Sender-Auth: Okgvxz6W2vXVpUgndtrhuXa8ycY
Message-ID: <AANLkTin-Zk6zJogwXsteqa=SW1E7mX=Nv3n1_u5fz4Ea@mail.gmail.com>
To: Julian Reschke <julian.reschke@gmx.de>
Content-Type: text/plain; charset="ISO-8859-1"
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] max frame size, was: frame length encoding
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: Sun, 22 Aug 2010 22:38:51 -0000

On Sun, Aug 22, 2010 at 6:50 PM, Julian Reschke <julian.reschke@gmx.de> wrote:

> 32 bits has the advantage that it's big enough for almost all use case we
> can currently think of.

At least one person has cited a case where a 31-bit length caused a
failure.  It's also naive to design for today's use cases and ignore
the basic rule that data volumes and sizes double every 24 months.
640K is enough for anyone, right?

The only cases that really matter here are:

- very short frames, where every byte is significant
- very long frames, where any ceiling is significant

Medium length frames can be treated as long frames with zero
significant cost.  You could stick a 100-byte header on a 100K frame
and it would not be significant.

There is no point optimizing any case except the two: very short (trim
space), very long (trim complexity).

It's also naive to claim that WebSockets is only for JavaScript, only
for dumb browsers, only for medium size data.  We're designing "TCP
over HTTP" in a real sense and there are generations of applications
that will use this, way beyond today's use cases.  Please, think of
the children!

-
Pieter Hintjens
iMatix - www.imatix.com