Re: Standard for upgrading based on URL?

Martin Thomson <mt@lowentropy.net> Wed, 13 October 2021 00:22 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 (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E62ED3A13E9 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 12 Oct 2021 17:22:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.997
X-Spam-Level:
X-Spam-Status: No, score=-2.997 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=lowentropy.net header.b=ITegP+rM; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=n4D1VW1V
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 gXbT4ftuhUZE for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 12 Oct 2021 17:22:46 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DF0023A13E3 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 12 Oct 2021 17:22:45 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1maS28-0004yo-08 for ietf-http-wg-dist@listhub.w3.org; Wed, 13 Oct 2021 00:22:12 +0000
Resent-Date: Wed, 13 Oct 2021 00:22:12 +0000
Resent-Message-Id: <E1maS28-0004yo-08@lyra.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <mt@lowentropy.net>) id 1maS25-0004y1-MV for ietf-http-wg@listhub.w3.org; Wed, 13 Oct 2021 00:22:09 +0000
Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by titan.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <mt@lowentropy.net>) id 1maS23-0004Le-P8 for ietf-http-wg@w3.org; Wed, 13 Oct 2021 00:22:09 +0000
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 36A495C0194 for <ietf-http-wg@w3.org>; Tue, 12 Oct 2021 20:21:57 -0400 (EDT)
Received: from imap41 ([10.202.2.91]) by compute5.internal (MEProxy); Tue, 12 Oct 2021 20:21:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lowentropy.net; h=mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type:content-transfer-encoding; s=fm3; bh=N2Z1V gCNSnHHpEt+p0izb2S/ow9d8Y3xaAHT1p4GLPY=; b=ITegP+rMaEJsqFwyIiCAf yeU7MB7VFbOut88Kr434dUirA71qc0UgSZo1DxhHBY3X3AeSVl5wHsSoPwhZYSY7 7qfxlXpVoDN6KlCPH/pRS5fdSQStud8NTi5BxlamN06HqDhO13fASJ98VGijevTN 99bVkMjotWwllw65Rhn66JT4GHmVDSN2fGXB58uMYgy5KK8rccZ+PoJ3RsOqOf1I DV7odlccgPmjKYV/YoM/dOMDEZxtISVIuPpstmSSaZzTfYH6SBXSw8ImAjqFrkDd 75jI/U3ZmoPQEF4sDV6CERAydl6JdjKhZ3fBvKlLU+5OrVLGAgZvQ8PFU8yTuRJx g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=N2Z1VgCNSnHHpEt+p0izb2S/ow9d8Y3xaAHT1p4GL PY=; b=n4D1VW1VI4Q7Z1TkXjk1yB4TMkCgFniG3phsN5aAZ9ln/a+gqrSNkIOIj MALdIXiMOHopvFlaoV/tkZ3G9NiqCRA7eLHFWwW95c7twk+3Nl5HM71FBB4taLYB zgMQZvdjC3Uc1JswwYybQ3Gsei/LWC+hIzosrvhfXBFafZCl4MwHpaYNBGlQf261 XD5NgrPrPSdtfcUddm1yPu7EutKcEe6T62kBU1UAELFDXlhU0CXJaG0RduUSfhF+ Gjkgif5t0O6F7aKMrY6B5nuQ2KGUnoYbBlQ8CShfauYUdhZ/WCLVMAtzMrrwZqm7 KFQmJkpjNCn8hBP9mYwakB9lulZDg==
X-ME-Sender: <xms:pSZmYXrbSpBD0_uOELzvdwP6BVadYQIIfoty-n8F0UsK7NoN3vMgAA> <xme:pSZmYRorfRnQGmlFbQYatYFm7QM9UoagTFZph45q5yBPj96aluQeyp03uBz929JG_ 1sTXn8Nsx1pMXJP-K0>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddtledgfeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtgfesth hqredtreerjeenucfhrhhomhepfdforghrthhinhcuvfhhohhmshhonhdfuceomhhtsehl ohifvghnthhrohhphidrnhgvtheqnecuggftrfgrthhtvghrnhepfeejvddvvedtheethf fhhffhffffhfeugeefleehudejudfgleelheetteelvedtnecuffhomhgrihhnpegvgigr mhhplhgvrdhinhdpihgvthhfrdhorhhgpdhouhhrrghpphdrtghomhdphhhtthhpvdhish htrhihihhnghhtohguohhinhhthhgvfhhirhhsthhplhgrtggvrdhonhgvpdhhthhtphdv tghonhhnvggtthhiohhnrdhsohenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehmtheslhhofigvnhhtrhhophihrdhnvght
X-ME-Proxy: <xmx:pSZmYUMOXY4s87ApUCKhJRQeSQ2v-eSdPG88iLLS7eBn5uBIwgQbQg> <xmx:pSZmYa6wFr3T5Ow5ycsgnKl9lcF0QCI1khK_9MnAGp0d4WQfapSDww> <xmx:pSZmYW5SEeaqgmhwaF69ASzwjWoXvK4SpG8fTdRsxiguB81fTA6vcw> <xmx:pSZmYYF76SLRpZfS-9S6TxCDXeKMeQ6v9vjmtj2OLhEibaPzZUWuag>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0F4643C0246; Tue, 12 Oct 2021 20:21:57 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.5.0-alpha0-1345-g8441cd7852-fm-20211006.001-g8441cd78
Mime-Version: 1.0
Message-Id: <d8d5d1a1-b4ce-433d-a9ef-a4529eb55a39@www.fastmail.com>
In-Reply-To: <CAF8qwaBH5tyD1rRpCdJZ57QtyhyQy4LrX+U1=6T0KGAVR8QQ1Q@mail.gmail.com>
References: <D594C4EA-B53A-482A-A220-680A99B25716@felipegasper.com> <CAHbrMsAhLHc-_igCJeDYRavfcw39G3vNxbGqa-Nfe4wEOVFCBw@mail.gmail.com> <CACcvr=mix602ycUDSvm3vJ76bLFr39HveQMhqP8Sn+NnqdeCfg@mail.gmail.com> <23152584-F830-469C-821A-8B85F8AA8C87@felipegasper.com> <CAF8qwaBH5tyD1rRpCdJZ57QtyhyQy4LrX+U1=6T0KGAVR8QQ1Q@mail.gmail.com>
Date: Wed, 13 Oct 2021 11:21:37 +1100
From: Martin Thomson <mt@lowentropy.net>
To: ietf-http-wg@w3.org
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=66.111.4.25; envelope-from=mt@lowentropy.net; helo=out1-smtp.messagingengine.com
X-W3C-Hub-DKIM-Status: validation passed: (address=mt@lowentropy.net domain=lowentropy.net), signature is good
X-W3C-Hub-DKIM-Status: validation passed: (address=mt@lowentropy.net domain=messagingengine.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-6.8
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1maS23-0004Le-P8 7825d949ecb270d723d786a244b5c847
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Standard for upgrading based on URL?
Archived-At: <https://www.w3.org/mid/d8d5d1a1-b4ce-433d-a9ef-a4529eb55a39@www.fastmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/39459
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: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

If you really do need multiple protocols and you can't tolerate in-line negotiation (I can't imagine why), new names might help.  So rather than ourapp.example/new and ourapp.example/old you might deploy h2 to new.ourapp.example.  In general, I'd think of that as a trial only, because HTTP/2 should ultimately deploy right alongside HTTP/1.1 for all URLs on your primary server.

Mike Bishop has done some thinking about how you might serve different parts of your content with different servers (and therefore also different protocols, though that was not his thinking).  See https://www.ietf.org/archive/id/draft-bishop-httpbis-distributed-origin-00.html for more.  If you are intent on exploring that space, know that you would be breaking totally new ground, with all the risks associated with that.

On Wed, Oct 13, 2021, at 07:58, David Benjamin wrote:
> On Tue, Oct 12, 2021 at 4:40 PM Felipe Gasper <felipe@felipegasper.com> wrote:
>> 
>> > On Oct 12, 2021, at 4:15 PM, Nick Harper <ietf@nharper.org> wrote:
>> > 
>> > Upgrading a connection from HTTP/1 to HTTP/3 isn't possible since they use different underlying transports (TCP vs QUIC).
>> 
>> Oops! Sorry, I meant upgrading to H2.
>> 
>> > What would be the use case for starting a TLS connection using HTTP/1 and then later upgrading to HTTP/2, instead of always using HTTP/2 on the connection? The in-band upgrade mechanism provided for h2c only exists so that a client without prior knowledge can use h2c; a similar mechanism isn't needed for h2 (over TLS) because the signal that HTTP/2 is supported is carried in ALPN.
>> 
>> We have an application server that only serves H1 right now. We’d like to be able to add new endpoints using H2 without having to rewrite the entire thing.
>> 
>> So:
>> 
>> https://ourapp.com/legacy-endpoint    <--- We’d like not to rewrite this (for now).
>> 
>> https://ourapp.com/new-endpoint       <--- We’d like to write this in H2.
>> 
>> The in-band upgrade mechanism for h2c trivially allows this since the URL is part of the client’s first sent line, but it doesn’t seem like the ALPN-based negotiation can allow that … or is there some way for the client to send the URL during the TLS handshake?
>
> No, something like this wouldn't really work for what HTTP/2 is trying 
> to do in the first place. One of the biggest benefits of newer 
> protocols like HTTP/2 and HTTP/3 is better use of the network via 
> connection reuse. That means that switching protocols on a 
> request-by-request basis doesn't really work. As a client, once a 
> suitable HTTP/2 or HTTP/3 connection is available, incoming requests 
> will go to that connection. If clients probed the server with a new 
> connection first, we'd negate all the benefits.
>
> The in-band upgrade didn't give you this property either. (The in-band 
> upgrade is getting removed in http2bis because no one implemented it, 
> so I'm guessing you haven't tested this?) Even if it is initiated by 
> something URL-triggered, the end result is an HTTP/2 connection. So, 
> suppose you hit /new-endpoint and upgraded to HTTP/2. The client now 
> has an HTTP/2 connection available, so when you go to hit 
> /legacy-endpoint, it would reuse that HTTP/2 connection rather than 
> making a new one. Your HTTP/2 server continues to be responsible for 
> /legacy-endpoint.
>
> If porting the legacy endpoints to the new application server is 
> difficult, I think the best solution is for your HTTP/2 frontend to 
> forward the legacy endpoints to the old application server, while 
> speaking HTTP/2 to the client. This lets you apply the benefits of 
> HTTP/2 across your entire origin.
>
> David