Re: HTTP2 server-side stream creation

Cory Benfield <cory@lukasa.co.uk> Wed, 08 July 2015 18:33 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@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 AB9BC1A7002 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 8 Jul 2015 11:33:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.912
X-Spam-Level:
X-Spam-Status: No, score=-6.912 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 u-gCFqMHmW9h for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 8 Jul 2015 11:33:29 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0AFBC1A6FFF for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 8 Jul 2015 11:33:28 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1ZCu7e-000105-EY for ietf-http-wg-dist@listhub.w3.org; Wed, 08 Jul 2015 18:31:06 +0000
Resent-Date: Wed, 08 Jul 2015 18:31:06 +0000
Resent-Message-Id: <E1ZCu7e-000105-EY@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <cory@lukasa.co.uk>) id 1ZCu7b-0000zJ-Sq for ietf-http-wg@listhub.w3.org; Wed, 08 Jul 2015 18:31:03 +0000
Received: from mail-wi0-f176.google.com ([209.85.212.176]) by lisa.w3.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <cory@lukasa.co.uk>) id 1ZCu7Y-0006r7-Mv for ietf-http-wg@w3.org; Wed, 08 Jul 2015 18:31:03 +0000
Received: by wiga1 with SMTP id a1so292790953wig.0 for <ietf-http-wg@w3.org>; Wed, 08 Jul 2015 11:30:33 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=Z4Fkgzy59d6VdekJ1rrhf5V83S/mdeTFtgDRWUFqI00=; b=Ayy7GT4ti/c/ZMgqmo0MbOIcAIZ/jtCJViueO9R4c9R6mQyRQUzScRCRQGlsbnMk/n F9ljtIlybjZjNsS84L7YfQvFpnQ8s4szRDtEN6l7I8wQ7uk1zQ7n9N0lKnQsLwDgaUus jZMcEx6FZCq00mz08Kp+B48wRlCNhggjhilb1wqtTxu1fuuV0FA0NshI1YIQMYebMCDQ KusRVzTlgpQYoA2VkjB4T4zNs9tUwBhs4gExOEKnMGoD6gUW/d7tAacgrKaSrsulTIgT r6nuolE7OXGET0wF/fqJauNQ/iTCkDA3j2PjK5QQSPYh9Hgbu52gQFdq/pVelPAviuxD NQ8w==
X-Gm-Message-State: ALoCoQnrF9n29cXXA7TqEXB9zTH3f7yNj65toTYEXMuEKU/NZMTBtYmWDcT2whqwb/CO8SYNr5HS
X-Received: by 10.180.10.200 with SMTP id k8mr3684876wib.14.1436380233813; Wed, 08 Jul 2015 11:30:33 -0700 (PDT)
Received: from corys-mbp-3.home (host86-157-24-35.range86-157.btcentralplus.com. [86.157.24.35]) by smtp.gmail.com with ESMTPSA id fq7sm4210771wic.5.2015.07.08.11.30.32 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 08 Jul 2015 11:30:32 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\))
From: Cory Benfield <cory@lukasa.co.uk>
In-Reply-To: <BL2PR03MB132DB8A550C6C6BF5DB118B87910@BL2PR03MB132.namprd03.prod.outlook.com>
Date: Wed, 08 Jul 2015 19:30:32 +0100
Cc: Amos Jeffries <squid3@treenet.co.nz>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <9DC7A816-FAC6-40D8-905C-472FA38838EC@lukasa.co.uk>
References: <CAEv2VfJKzwAA98hqVAnEDAfP4ixF3YSJ3TLMmA=b1zf2O8GpwQ@mail.gmail.com> <CAH_hAJE+9Y5rZeHPHNpDYW6p4jQEC1yN5C3Jd96M-YiZrY0mFw@mail.gmail.com> <559CFBB3.1040908@treenet.co.nz> <BL2PR03MB132DB8A550C6C6BF5DB118B87910@BL2PR03MB132.namprd03.prod.outlook.com>
To: Mike Bishop <Michael.Bishop@microsoft.com>
X-Mailer: Apple Mail (2.2102)
Received-SPF: pass client-ip=209.85.212.176; envelope-from=cory@lukasa.co.uk; helo=mail-wi0-f176.google.com
X-W3C-Hub-Spam-Status: No, score=-4.6
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: lisa.w3.org 1ZCu7Y-0006r7-Mv 3a2582d3b5a8dca034cc5d5093bb1b68
X-Original-To: ietf-http-wg@w3.org
Subject: Re: HTTP2 server-side stream creation
Archived-At: <http://www.w3.org/mid/9DC7A816-FAC6-40D8-905C-472FA38838EC@lukasa.co.uk>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/29884
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>

With the IETF Prague meeting so close I currently cannot submit any internet drafts, but in the meantime a quick top-level proposal is readable here[0] if anyone would like to provide feedback.

I’ll submit the ID properly when submissions re-open on the 19th.

Cory

[0]: https://raw.githubusercontent.com/Lukasa/http2-p2p/master/draft-benfield-http2-p2p-00.txt

> On 8 Jul 2015, at 18:50, Mike Bishop <Michael.Bishop@microsoft.com> wrote:
> 
> Alternately stated, HTTP/2 defines two "things" -- a multiplexed binary framing layer, and a mapping of HTTP semantics to that framing layer.
> 
> The framing layer doesn't prohibit server-initiated streams, but outside of Server Push the mapping of HTTP semantics doesn't use them.  A server-initiated stream wouldn't mean anything to an HTTP client, until you have an extension that defines them.
> 
> -----Original Message-----
> From: Amos Jeffries [mailto:squid3@treenet.co.nz] 
> Sent: Wednesday, July 8, 2015 3:30 AM
> To: ietf-http-wg@w3.org
> Subject: Re: HTTP2 server-side stream creation
> 
> On 8/07/2015 7:49 p.m., Cory Benfield wrote:
>> On 7 July 2015 at 23:43, Fedor Indutny wrote:
>>> Obviously, the most straightforward way is to do a PUSH_PROMISE on 
>>> existing client-initiated stream, but it appears to me that the 
>>> server-initiated streams created using HEADERS frame are valid too.
>> 
>>> From section 8.1 of RFC 7540[0]:
>> 
>>> A client sends an HTTP request on a new stream, using a previously 
>>> unused stream identifier (Section 5.1.1).  A server sends an HTTP 
>>> response on the same stream as the request.
>> 
>> My reading is that this forbids a 'server' from sending a HEADERS 
>> frame first, because servers send responses on already-opened streams.
>> 
>> You could pretty easily construct a semantic for this that essentially 
>> turns HTTP/2 into a peer-to-peer communication stream, with both sides 
>> of the connection being free to issue requests. This could plausibly 
>> be very valuable in systems that use HTTP/2 as an RPC transport. I 
>> suspect most clients will currently not allow that behaviour, however, 
>> so if you wanted it it might be best to propose it as a negotiated
>> HTTP/2 extension, per section 5.5 of RFC 7540[1]. If you (or anyone 
>> else on the list) think this is interesting I'd be happy to co-author 
>> a draft to propose it.
> 
> Technically.
> 
> However, HTTP/1.x currently still exists in the world. A surprisingly large number of connections one way or another pass over at least one HTTP/1.x transit hop. So for now any implementations will have to cope with translation to HTTP/1.x where server requests are not possible.
> 
> HTTP/2 was designed with that in mind, thus it does not define server-initiated semantics. But also does not forbid them outright, since extensions or HTTP/3 may one day have a need to define it.
> 
> If you have a strong use case for it I suggest writing up a SETTINGS extension which can be negotiated between two endpoints. That way 2->1.1 gateway devices can negotiate its absence for the 1.1 hops and things still work.
> 
> HTH
> Amos
> 
>