Re: HTTP/2 and Websockets

Yutaka Hirano <yhirano@google.com> Tue, 14 October 2014 10:31 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 (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9201D1A7008 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 14 Oct 2014 03:31:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.165
X-Spam-Level:
X-Spam-Status: No, score=-7.165 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.786, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KT-mWFzhmXtR for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 14 Oct 2014 03:31:36 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8C88C1A70FE for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 14 Oct 2014 03:31:36 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1XdzLl-0005mQ-FE for ietf-http-wg-dist@listhub.w3.org; Tue, 14 Oct 2014 10:29:05 +0000
Resent-Date: Tue, 14 Oct 2014 10:29:05 +0000
Resent-Message-Id: <E1XdzLl-0005mQ-FE@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <yhirano@google.com>) id 1XdzLe-0005lh-Jf for ietf-http-wg@listhub.w3.org; Tue, 14 Oct 2014 10:28:58 +0000
Received: from mail-yh0-f50.google.com ([209.85.213.50]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <yhirano@google.com>) id 1XdzLd-0000GO-En for ietf-http-wg@w3.org; Tue, 14 Oct 2014 10:28:58 +0000
Received: by mail-yh0-f50.google.com with SMTP id a41so4650180yho.37 for <ietf-http-wg@w3.org>; Tue, 14 Oct 2014 03:28:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Us6sFTDtUZoeD7nvfc8gt66RJmaLZGMyMHyEXTiOfdQ=; b=gQ3M9Akd3PiTe4OU69SgAzhBaLYLPw3hy1QGGnY2TcSouHbQOBqDvjyphfnWcBb52p M5fZx8uZcWstDPD63dQUHu2pQTpN9h0Rx0TroyDoheQuyEsjHsT/at2Q/+cKyrnimKI0 7mhIAAfEQWdXhAwBjVAwz/UjKY6SXPWEYNnU/gNXX9snDte1hWhMjXOQp44tN4t9dc+U Dz0YqTYpFMCVVog1kCNYVZRzHBrZMa195POuSmEBYk3Gx3/jUr8Ggb0lPd3DubaGF/yr aczx+VSRNlKidyc9d6rWcvZyXFPwsNn0xBwYfCOHO3nzTk+v1mQQUz1GQ1uFot2kJCDM fOtg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Us6sFTDtUZoeD7nvfc8gt66RJmaLZGMyMHyEXTiOfdQ=; b=NsTOdBllDL7WNnjna7Q8XXw/CC6lXMCU44lFURu9Z3t6r6JKaFOucCBeAIm3tj0Ub7 TgQbz1BPTs2B6J6hWf2mD+0bVsGvtXVAv5UIOivumMAAz8nStZA9IEFF5lTjwuabr41o VMFrT8BNdXelXF+CtDjOV1WE6HBt0JprmoTHDY/CCM0EUD0RZRj4ti7Nsdlq7j2b7kZE 87rBf3bUKiy44RpfvGxnH75Liu6/vEI2zgkTGQr7CHMIWTeyFSguFKl+12+a3FsrhKhZ KU/Uh2qdym5g9k7CCfWFj9qWTRh3Bj0ig9V4GllKLYXd/zBMg3q7iQ+u0dabzyglKOL4 WkoQ==
X-Gm-Message-State: ALoCoQlobBON9tUd/ZizTSFkNz0YVMLXB4nteYqs3KH6cX05r5NfXJBVDklC3SAjDLbYpAOepOrk
MIME-Version: 1.0
X-Received: by 10.236.15.199 with SMTP id f47mr5913863yhf.11.1413282511619; Tue, 14 Oct 2014 03:28:31 -0700 (PDT)
Received: by 10.170.42.70 with HTTP; Tue, 14 Oct 2014 03:28:31 -0700 (PDT)
In-Reply-To: <CAJ3HoZ1B5hGrhzAnVYnDbYWV_BPmqMKsOhvM7VvS+2xFNT7krw@mail.gmail.com>
References: <CAJ3HoZ1gHH1MmY=NY68HBcFV7u74qKtkdWDe4i93MkjnXE+sPg@mail.gmail.com> <CABihn6GAu7pViZ3JxHAm1-SOeFLvxOQAuhrzwROGGY2jiCg4Cg@mail.gmail.com> <CAJ3HoZ3wfFMT2=duF22FyQGgdPzJwfmSSw0t82c9uvTkcsm1wg@mail.gmail.com> <CABihn6FwK7uZpg6v7u9byTw6xNsTjFsWfv_QyPMReTtumaXJWA@mail.gmail.com> <542BD960.7020407@treenet.co.nz> <CAJ3HoZ1B5hGrhzAnVYnDbYWV_BPmqMKsOhvM7VvS+2xFNT7krw@mail.gmail.com>
Date: Tue, 14 Oct 2014 19:28:31 +0900
Message-ID: <CABihn6G3YRLJm2v_NogvXjoQakF+GzbKahevsF=GqT-PqbXVeA@mail.gmail.com>
From: Yutaka Hirano <yhirano@google.com>
To: Robert Collins <robertc@robertcollins.net>
Cc: Amos Jeffries <squid3@treenet.co.nz>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="089e0122a99e12a66905055f7a0c"
Received-SPF: pass client-ip=209.85.213.50; envelope-from=yhirano@google.com; helo=mail-yh0-f50.google.com
X-W3C-Hub-Spam-Status: No, score=-4.3
X-W3C-Hub-Spam-Report: AWL=-1.616, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01
X-W3C-Scan-Sig: maggie.w3.org 1XdzLd-0000GO-En ec85fc938639c489b7ac3119797f29a3
X-Original-To: ietf-http-wg@w3.org
Subject: Re: HTTP/2 and Websockets
Archived-At: <http://www.w3.org/mid/CABihn6G3YRLJm2v_NogvXjoQakF+GzbKahevsF=GqT-PqbXVeA@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/27593
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>

>
> I was suggesting that we just treat the HTTP/2 stream like the TCP
> connection in RFC 6455 - the conversation from stream to message based
> semantics and so on can take place above that in the ws implementation
> - and that we should still apply the transmission windows etc to ws
> streams.

So your opinion is similar to
http://tools.ietf.org/html/draft-hirano-httpbis-websocket-over-http2-00#section-5.2.1
, right?
As I said, I would like a guarantee that intermediaries do not buffer data
across the message boundary. END_SEGMENT was a mechanism to archive this,
but it was gone. So I want to specify a new frame type (WEBSOCKET_DATA) to
guarantee that (Note: I'm not sure if tunneling is good or bad, but
forbidding buffering across the message boundary is important in any case).


On Tue, Oct 14, 2014 at 7:01 PM, Robert Collins <robertc@robertcollins.net>
wrote:

> On 1 October 2014 23:37, Amos Jeffries <squid3@treenet.co.nz> wrote:
>
> >> All the implementor discussion I've seen during the
> >>> HTTP/2 discussions has focused on how intermediaries want to be
> >>> scalable: and buffering is anti-scaling. So - is it a pragmatic
> >>> concern, or do we expect DATA stream buffering to take place
> >>> [outside of protocol gateways converting to HTTP/1.1 where non
> >>> upload can require buffering - and note that such a gateway can't
> >>> carry ws anyway unless its aware of it, and if its aware of it,
> >>> it can make sure it does not buffer].
> >
> >
> > I think the problem is not buffering in HTTP/2 per-se but the DATA
> > frame (de-)aggregation that can happen if the frames are buffered by
> > general network conditions (ie in TCP bottlenecks). This would not be
> > good for a 1:1 relationship between DATA and ws frames.
> >
> > Amos
>
> So hang on a second here. If we say that ws frames can't be split over
> multiple HTTP/2 frames that implies that we have to buffer them until
> there is enough in the window to transmit a potentially very large
> packet all at once. It also conflicts with RFC6455 - the specific
> intent there is to not be a stream based system.
>
> I was suggesting that we just treat the HTTP/2 stream like the TCP
> connection in RFC 6455 - the conversation from stream to message based
> semantics and so on can take place above that in the ws implementation
> - and that we should still apply the transmission windows etc to ws
> streams.
>
> -Rob
>
>
>
> --
> Robert Collins <rbtcollins@hp.com>
> Distinguished Technologist
> HP Converged Cloud
>
>