Re: [hybi] Framing take IV

Ian Fette (イアンフェッティ) <ifette@google.com> Wed, 04 August 2010 02:04 UTC

Return-Path: <ifette@google.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 C70FF3A6A30 for <hybi@core3.amsl.com>; Tue, 3 Aug 2010 19:04:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.409
X-Spam-Level:
X-Spam-Status: No, score=-101.409 tagged_above=-999 required=5 tests=[AWL=0.267, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, 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 MoFEVztR3rt3 for <hybi@core3.amsl.com>; Tue, 3 Aug 2010 19:04:37 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.35]) by core3.amsl.com (Postfix) with ESMTP id 029F43A6A1D for <hybi@ietf.org>; Tue, 3 Aug 2010 19:04:36 -0700 (PDT)
Received: from wpaz9.hot.corp.google.com (wpaz9.hot.corp.google.com [172.24.198.73]) by smtp-out.google.com with ESMTP id o741XgsD007659 for <hybi@ietf.org>; Tue, 3 Aug 2010 18:33:43 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1280885623; bh=Kd8WpYFYotHUPBwNywqaa3j+ohI=; h=MIME-Version:Reply-To:In-Reply-To:References:Date:Message-ID: Subject:From:To:Cc:Content-Type; b=wdDqrRlhfV1XkZmGlbXqee8eoyxtORPCzQqOB8nDUuGULbBMa+dLGTJFtmUXV3dGL 2bAEfRJ/Lahi4wnEP6ZHw==
DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:reply-to:in-reply-to:references:date: message-id:subject:from:to:cc:content-type:x-system-of-record; b=H3+rZs2kqUnLwfH2cpSHUao9KJXd00vTBDNSubDOOamIdI5PjbhRl0HIVdJ3SoD2u lEfASJGRAevnFqZVMJ5dA==
Received: from ywe9 (ywe9.prod.google.com [10.192.5.9]) by wpaz9.hot.corp.google.com with ESMTP id o741Xfr5015041 for <hybi@ietf.org>; Tue, 3 Aug 2010 18:33:41 -0700
Received: by ywe9 with SMTP id 9so1905454ywe.6 for <hybi@ietf.org>; Tue, 03 Aug 2010 18:33:41 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.151.4.8 with SMTP id g8mr9362892ybi.365.1280885620926; Tue, 03 Aug 2010 18:33:40 -0700 (PDT)
Received: by 10.150.67.19 with HTTP; Tue, 3 Aug 2010 18:33:40 -0700 (PDT)
In-Reply-To: <28A6543A-5CA6-42B7-8D2E-F5511EE20008@apple.com>
References: <AANLkTinyrDoG5d_Ur6HVRy=SgMPjLzJtpJ++Ye=1DQdj@mail.gmail.com> <Pine.LNX.4.64.1008040050040.5947@ps20323.dreamhostps.com> <28A6543A-5CA6-42B7-8D2E-F5511EE20008@apple.com>
Date: Tue, 03 Aug 2010 18:33:40 -0700
Message-ID: <AANLkTik0-gG-CE5LNt+qDN9X1QupN0dnFtKcbt2athqO@mail.gmail.com>
From: "Ian Fette (イアンフェッティ)" <ifette@google.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: multipart/alternative; boundary="000e0cd299da6eeab7048cf56ca0"
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] Framing take IV
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: ifette@google.com
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: Wed, 04 Aug 2010 02:04:38 -0000

On Tue, Aug 3, 2010 at 6:18 PM, Maciej Stachowiak <mjs@apple.com> wrote:

>
> On Aug 3, 2010, at 5:53 PM, Ian Hickson wrote:
>
> > On Wed, 4 Aug 2010, Greg Wilkins wrote:
> >>
> >> I think that we have reasonable consensus on something like:
> >>
> >>  +--------------------------------------------------+
> >>  | frag(1) |unused(3) | opcode(4) |  Length(16)     |
> >>  +--------------------------------------------------+
> >>  |                      Data                        |
> >>  +--------------------------------------------------+
> >
> > Why would we have a fixed length field with fragmentation rather than a
> > variable length field?
> >
> > If we can have a variable width length field, do we need to support
> > fragmentation in the first version? I could see an argument for
> supporting
> > fragmentation in the case of multiplexing, but without that it doesn't
> > seem to actually gain us anything.
>
> I agree. I can't see any benefit to fragmentation over a variable-size
> length field for an initial version without multiplexing. If the
> variable-size length field is well-designed, then in the common case where
> the message size is small it will only cost one extra branch to read the
> length. In the rare case where the message size is large, a variable-size
> length is easier to deal with than reassembling fragments, and easier on the
> sending side too.
>
> I'm not really persuaded we need multiplexing at all until I see data
> proving the benefits. Useful data would be:
>
> - Average degree of multiplexing we could likely get in real Web
> applications, based on measured user behavior. I'd like to see this for at
> least two different Web apps from two different vendors to make sure we are
> not overtuning to a single vendor's setup.
>
>
I don't think we would be able to get any data from a Google deployment in a
reasonable time for this discussion, sadly.


> - Concrete performance benefits of multiplexing over a single TCP
> connection vs. using multiple connections. I have yet to hear an answer that
> involves numbers and doesn't sound handwavey.
>

For us it's the number of open sockets on the frontend, plain and simple.
Each open socket == more kernel memory for socket buffers. Whereas, if we
have multiplexing, I can take in a frame, see what stream it is, send it off
to the appropriate backend and be done. Holding open multiple connections
for a single user kills us.


>
> - Performance cost of implementing multiplexing at the application level
> compared to doing it at the protocol level (either in terms of more
> connections resulting and the actual cost of that, or in terms of additional
> overhead on the client side from using an iframe or shared worker or
> whatever to share the connection.)
>
>
At the application level we would need an <iframe> to google.com to get a
shared worker, and then use postmessage. The iframe itself would be enough
of a latency hit that we would consider it problematic for e.g. deployment
on the homepage. Plus, if we wanted to multiplex sending large and small
data, we would probably have to break up the large data at
an application level and re-assemble it at an application level on the
server side, and I cannot imagine that being performant. Again, I'm much
more interested in squeezing out every last drop of performance. That's the
whole reason for WS in my mind as opposed to existing JS APIs. If
Multiplexing isn't part of the base API, at the very least it needs to be
possible to do it efficiently via a protocol-level extension, and we need to
define the mechanisms for such extensions now so that we can start doing
experiments and get deployments and the data you request.


> I'm open to trading off simplicity for performance, but only if I see data
> backing up the performance claims. Every performance project should start
> with measurement.
>
> Regards,
> Maciej
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>