Re: [hybi] New Version Notification for draft-mcmanus-httpbis-h2-websockets-00.txt

Mike Bishop <Michael.Bishop@microsoft.com> Mon, 16 October 2017 17:13 UTC

Return-Path: <Michael.Bishop@microsoft.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CEEDF13319E for <hybi@ietfa.amsl.com>; Mon, 16 Oct 2017 10:13:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.799
X-Spam-Level:
X-Spam-Status: No, score=-4.799 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.com
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 qZW3PVsJIEQo for <hybi@ietfa.amsl.com>; Mon, 16 Oct 2017 10:13:21 -0700 (PDT)
Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0109.outbound.protection.outlook.com [104.47.42.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B0498133072 for <hybi@ietf.org>; Mon, 16 Oct 2017 10:13:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=KiOuKTWmoaaCGAoSOrub8iPZzW0RM4dhSqNDOVMkxrk=; b=eyz8MPzaXqC4wu9qOi6ouD634uUEVSVG3Jtj9qRYj78jdw5XHgd7WyKWUDnN/albCgRjm/TRagIxz+/xART68nUfYIu1R5euYeWTExAStJvHNOPgZdIzZw1S/WOr7nXRymLKcrusGO51jOTBLK96n9/H+pSYqSMY2Ty71GVglFY=
Received: from MWHPR21MB0141.namprd21.prod.outlook.com (10.173.52.11) by MWHPR21MB0800.namprd21.prod.outlook.com (10.175.142.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.178.1; Mon, 16 Oct 2017 17:13:20 +0000
Received: from MWHPR21MB0141.namprd21.prod.outlook.com ([10.173.52.11]) by MWHPR21MB0141.namprd21.prod.outlook.com ([10.173.52.11]) with mapi id 15.20.0156.003; Mon, 16 Oct 2017 17:13:19 +0000
From: Mike Bishop <Michael.Bishop@microsoft.com>
To: Patrick McManus <pmcmanus@mozilla.com>, Andy Green <andy@warmcat.com>
CC: Martin Thomson <martin.thomson@gmail.com>, hybi <hybi@ietf.org>, "Cory Benfield" <cory@lukasa.co.uk>, Patrick McManus <mcmanus@ducksong.com>, "HTTP Working Group" <ietf-http-wg@w3.org>
Thread-Topic: [hybi] New Version Notification for draft-mcmanus-httpbis-h2-websockets-00.txt
Thread-Index: AQHTRnkXSa3fJMYEE0KGC67TZNNyA6LmtAUg
Date: Mon, 16 Oct 2017 17:13:19 +0000
Message-ID: <MWHPR21MB0141A705D0182DA51B934280874F0@MWHPR21MB0141.namprd21.prod.outlook.com>
References: <150807649389.12130.9191022211105955718.idtracker@ietfa.amsl.com> <CAOdDvNqhaTJmLcEk3CwBBaAbdOroc4U46z+nJzC7+chd1ErSDA@mail.gmail.com> <FEBB57D4-E841-4F45-9B62-81FFC653FF70@lukasa.co.uk> <0F93FB58-579D-4F52-8F22-5FEAFBC99165@warmcat.com> <CAOdDvNpCVxsaKEzoW3EWsK1hmWSBPOP+GHnK-DcP4QO4om_khQ@mail.gmail.com> <f4bb6b5c-b12e-dc59-6faa-15588b692574@warmcat.com> <CABkgnnUfDwYmxi72f-x=z=iwf4+3L_rcLqufJRYvEMpP=Fb3MA@mail.gmail.com> <a4229e61-fb04-30b1-f2c7-a862645d0059@warmcat.com> <CABkgnnX0uXm1mDHL+dy6Z+mCZdofkEshd5jy-a0jV-Hsp88yQA@mail.gmail.com> <3dd5002d-49ca-4af5-1b38-f1dbe530b98e@warmcat.com> <CABkgnnWfTcGyUDBfSs1S+M4xaeELZKXa=9JP79kKKvsSjL_ouA@mail.gmail.com> <dda4b424-b2e3-7096-c2ce-f61e54df2384@warmcat.com> <CABkgnnVeXGzw2HjxkUWW8O_EOjhe6j3p1yqJUuezvMnBtHxtLQ@mail.gmail.com> <e971cda1-f022-50a6-0e3b-d1a264d6f358@warmcat.com> <CAOdDvNrZf-19CmPnZFma_H+iajVgXkUjFiPH0jX3MAVVKju5hg@mail.gmail.com>
In-Reply-To: <CAOdDvNrZf-19CmPnZFma_H+iajVgXkUjFiPH0jX3MAVVKju5hg@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [2001:4898:80e8:2::659]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; MWHPR21MB0800; 6:1+F9+/G4TGSw9SAuYF2e7atnFoUdaeT3Mfa3IkUeAfjCO3mdLs/0ng4OgKqmJIqnsES6sgHL33+DkF8OpCikRSw24zJoFrX+gw8OfE4+XWgvqvwZkos38e2AdxRycL6dLP6V5gg0Zb4jc3PMLofdqreRM90sgRnXBNZXu+ir7KNyV6nUgr/7GPW+6zmURrpVy7p5rcVxskAME1w5gppfHvbyqoO/jBaSk6EPylcJ0kwv1WFYkrL2OBpNhMVX54b3fYuBfVgNsO8N+DoobX9q++/pDqWZRQpKsPBL+Wwf6PxTqbwax+oLebsHxla0vyIu7GpHhKe5BgezMND5rM8rXVQfDlP3/QdkI/Q9IslaboA=; 5:4wjaeiXRI/ZlOBK6IVNOlVZh7nxkjHtIyAlLssiK0x62Ax3hVJnPWOp/mZrK62HL/rMcimTitN9dYfOgQsqu7C0QawjcCIW0Wis/tgQgWThSZzB8PvalsxhuoWmHFOaCS6IH9yMay6haxhDRTVyGTZ3Cci7upDJCuZUA0VBB3Jc=; 24:iNTgj8Wl/Xt4RRQ+byUK5an32u1QqJeQZK+FtR0Y6ZOpPYvqx24Lj1nC1D9fZw7khhkei3b1CATdhgModSGyKXnzMz9zBzJi0uSsphQOnGA=; 7:CvypU6jhIxF4E0Qe7xBuQzbGTyRvX+1ZYSEh7J4UN6b/wUxonS93xpKdvGQT11GxfKsKV/0LPUwXG+H2SduW7Nvb5v5XwUXbB1Tt1JHPVQwqlWYsBVB/YQqnntPnh/qDJIX/U10cBUsoGQU58h7QmI9WLwGq24g5nZzaA8Iw72Et4a8eR/pDGf+6AvOROp9Guz/WPCIJrOQC6LHYS9HvfUmM7iGQ+v6a3J0r1jxmcDycVUL7+MfPDrzf6hM8ecT/
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: 8f65d9f1-1820-40ae-4de0-08d514b932fe
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603219)(201703131423075)(201703031133081)(201702281549075); SRVR:MWHPR21MB0800;
x-ms-traffictypediagnostic: MWHPR21MB0800:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Michael.Bishop@microsoft.com;
x-exchange-antispam-report-test: UriScan:(158342451672863)(21748063052155)(21532816269658)(17755550239193);
x-microsoft-antispam-prvs: <MWHPR21MB0800683691F48AFFC0C60934874F0@MWHPR21MB0800.namprd21.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(61425038)(6040450)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6055026)(61426038)(61427038)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(20161123558100)(20161123562025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR21MB0800; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR21MB0800;
x-forefront-prvs: 0462918D61
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(39860400002)(376002)(47760400005)(24454002)(199003)(377454003)(189002)(19609705001)(86612001)(8990500004)(6436002)(8936002)(7736002)(15650500001)(77096006)(101416001)(10090500001)(347745004)(106356001)(72206003)(105586002)(5660300001)(25786009)(86362001)(4326008)(39060400002)(74316002)(9686003)(2420400007)(478600001)(99286003)(10290500003)(55016002)(54896002)(97736004)(6506006)(6306002)(68736007)(7696004)(53936002)(229853002)(33656002)(236005)(3660700001)(189998001)(2900100001)(3280700002)(22452003)(7110500001)(230783001)(8676002)(2950100002)(81156014)(81166006)(10710500007)(93886005)(53546010)(2906002)(54356999)(76176999)(50986999)(790700001)(6246003)(54906003)(6116002)(110136005)(316002)(14454004)(102836003); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR21MB0800; H:MWHPR21MB0141.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_MWHPR21MB0141A705D0182DA51B934280874F0MWHPR21MB0141namp_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 8f65d9f1-1820-40ae-4de0-08d514b932fe
X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Oct 2017 17:13:19.7743 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR21MB0800
Archived-At: <https://mailarchive.ietf.org/arch/msg/hybi/bllAImQtMK1SYXQFLFhQFNbjgPo>
Subject: Re: [hybi] New Version Notification for draft-mcmanus-httpbis-h2-websockets-00.txt
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/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: Mon, 16 Oct 2017 17:13:24 -0000

Generalizing CONNECT to allow you to tunnel protocols other than TCP – or rather, to explicitly state what protocol the other side should be expecting the TCP connection to speak – is a neat approach.  So first off, kudos!

If you say you’re upgrading to WebSockets, then I’d expect it to actually upgrade straight to WebSockets, not an HTTP/1.1 request which is expected to then upgrade to WebSockets.  I understand that would entail putting all the WebSocket negotiation headers on the CONNECT itself, etc. and I’m sympathetic to the argument that it is a larger change that may produce a roadbump.  But you’re making a commitment at the HTTP/2 layer that actually means nothing (“wss” scheme, “websocket” :protocol).

Given that you’re doing the full Upgrade-to-WebSockets dance inside the tunneled connection, why don’t you just say that you’re CONNECTing to an HTTP/1.1 tunnel?  That’s then treated as HTTP/1.1 over TCP, which is fully allowed to do Upgrade itself.  If you’re sure that’s the path you want, then simply say in the HTTP/2 layer that you’re doing HTTP/1.1 inside the stream.  Incidentally, that might be a nice alternative for dealing with HTTP_1_1_REQUIRED responses, too!

From: Patrick McManus [mailto:pmcmanus@mozilla.com]
Sent: Monday, October 16, 2017 5:16 AM
To: Andy Green <andy@warmcat.com>;
Cc: Martin Thomson <martin.thomson@gmail.com>;; Patrick McManus <pmcmanus@mozilla.com>;; hybi <hybi@ietf.org>;; Cory Benfield <cory@lukasa.co.uk>;; Patrick McManus <mcmanus@ducksong.com>;; HTTP Working Group <ietf-http-wg@w3.org>;
Subject: Re: [hybi] New Version Notification for draft-mcmanus-httpbis-h2-websockets-00.txt



On Mon, Oct 16, 2017 at 12:44 AM, Andy Green <andy@warmcat.com<mailto:andy@warmcat.com>> wrote:

You can probably pipeline the CONNECT + ws handshake though, Patrick shows them sequentially and I didn't think about it myself.

right. The example is just for clarity and cannot show all expressions of h2 flows.

CONNECT + DATA before the response headers is pretty much the h2 analog of TCP Fast Open. The devil is in the details.. That's a general CONNECT + DATA issue not limited to the protocol upgrade described here so I don't think its worth discussion in a websockets rfc.

I think the path to success here hinges on a very tight scoping of work and therefore optimizing handshake latency is a non-goal of this effort.


Still only two round trips.

 - SETTINGS                      - SETTINGS
 - GET /index.html
                 - 200 HEADERS + DATA

 - :method CONNECT
 - DATA ws handshake
                  - 200 HEADERS
                  - DATA ws handshake final
                  - DATA...

 - DATA ...             - DATA...

With the part of the pipelining that is legal for ws, two round trips before the client can start to send data and 1.5 before the server can send data... if it's true then you're right it's not so bad.
Were you concerned that the client needs to learn that the server
supports websockets and not just :protocol?

No I just followed Patrick's sequencing; he shows them serialized.  But you're right at least the CONNECT + ws handshake can probably be pipelined.

That's also going to be a variation from normal h2 HEADERS flow if I understood it, on one stream there will be END_HEADERs coming twice (for the CONNECT and the ws handshake separately)

Anyway you are right, it makes any difference with PUSH_PROMISE probably not worth the effort.

-Andy