Re: Stream limits draft posted

Ben Schwartz <bemasc@meta.com> Wed, 15 November 2023 17:03 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=ietf.org@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 2F71AC14CF1C for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 15 Nov 2023 09:03:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.745
X-Spam-Level:
X-Spam-Status: No, score=-2.745 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.249, HTML_FONT_LOW_CONTRAST=0.001, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=meta.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gOT_sEBfz3cy for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 15 Nov 2023 09:03:29 -0800 (PST)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 40A93C14CEE3 for <httpbisa-archive-bis2Juki@ietf.org>; Wed, 15 Nov 2023 09:03:28 -0800 (PST)
Received: from lists by lyra.w3.org with local (Exim 4.94.2) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1r3JGM-003PjN-5t for ietf-http-wg-dist@listhub.w3.org; Wed, 15 Nov 2023 17:01:14 +0000
Resent-Date: Wed, 15 Nov 2023 17:01:14 +0000
Resent-Message-Id: <E1r3JGM-003PjN-5t@lyra.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <prvs=46836bc5ef=bemasc@meta.com>) id 1r3JGJ-003PiE-8t for ietf-http-wg@listhub.w3.org; Wed, 15 Nov 2023 17:01:11 +0000
Received: from mx0a-00082601.pphosted.com ([67.231.145.42]) by mimas.w3.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <prvs=46836bc5ef=bemasc@meta.com>) id 1r3JGF-00C8nW-2o for ietf-http-wg@w3.org; Wed, 15 Nov 2023 17:01:10 +0000
Received: from pps.filterd (m0109334.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AFEAHnZ009144; Wed, 15 Nov 2023 09:01:00 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=s2048-2021-q4; bh=9uxUy9bJ3f9c3TyZN2arcKEB8UqF44gRSBMNj/qFkzo=; b=XSPABBvMXCVJEdsnanRwbKcHZOb1bQqoj+ukRuEr+Knmy2YA7JU4HgHD/o/mV5/gjVSO DCJGe9rPQfPQSDaU8BIHC7G/GlIhddk9npr5B+O5MfDkQ69kSC0mErhfbpcIBn2Wz6Jk MVuoE5gN0Vwosf4IkDPPiAqBaZHo30RPimFvrlEdIqQsmSICqXOmmbVMCilw0+Pivhlz QqcTLNxWrA+RrKAHHY2kIGFoNxuVfbdGdMULNF12ildyXZtXJawmihQGDDG3GP+Lm2U+ /6H2ZT4a9icfj/xFvCzRtT7rxsHFZsVDtAMA/NDf3TC4YHKgE0XvUUp9x7Kl+Lwsf6Mf dQ==
Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3ucvsk22pu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Nov 2023 09:00:59 -0800
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fYi5u72XobVXVppgR9GDyRc90dQMAatXZy7iLKxBpaty205thBjP/HJOhnwQjpdfTVMmki1/61ZK5aeJjkyhznICwLXNRJhER7x860bzRMQHiX1LmsyIL1Suy+teU9daLozE5cd6zttAg2lGJE05CzapMHoMi2jnUeetwduJU+NhEnh+c/XXQyE+K4/BYyM6L65BG/NEo4ZCMTRwPz9+nDLc/qlWP94SlgEdYej7Fv5NIM2CUa9mwcmUEvK6n1rf2Leu9TBC+10xqxBH1UQUkoGa+R/vGhf4XSHA006agHRyFB2r33gnc0ULHStgd2PCnzpdRV3IAniuNE6b+hRY1A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=C5oFwDQVpHY7ZbCwcBAi4uy+/AS8R3sZJSHy1QYzUCU=; b=LQuHYHm1BWtZZM9dVskO+iDPxcAetUtVtkGy6B6h0iysDyziJKajCxKTuvJ2ZZP4BZFbQsdXG/ZENcv1Cg9hd9hhNHlxhxlXeU4N5xl22Wd66SwibPgbr8gDz36q2ActTRUT/sxeHXu3nJP+9QgRRrHBOn7ptvfyJFs7F2nPWJ2yX/XugVzrZ96rGT1w/zetpkF7q88lPQ8jkUuM9uAXfv33h3dLUNEDJGaMgVZf16Y0Z41F1uNgM1N+T58ikeGNmO/VCI3QM43AzKJVs8bWkWFUfukFLsvKmCJ8DIDq5kR3NZH5Fq71OWX/5gQVGgEyrN0jFmrAVqT+2N5kBgSoTw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=meta.com; dmarc=pass action=none header.from=meta.com; dkim=pass header.d=meta.com; arc=none
Received: from BN8PR15MB3281.namprd15.prod.outlook.com (2603:10b6:408:aa::24) by DM4PR15MB5454.namprd15.prod.outlook.com (2603:10b6:8:bf::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.14; Wed, 15 Nov 2023 17:00:56 +0000
Received: from BN8PR15MB3281.namprd15.prod.outlook.com ([fe80::d54d:eea6:c930:d1e6]) by BN8PR15MB3281.namprd15.prod.outlook.com ([fe80::d54d:eea6:c930:d1e6%2]) with mapi id 15.20.7025.007; Wed, 15 Nov 2023 17:00:55 +0000
From: Ben Schwartz <bemasc@meta.com>
To: David Benjamin <davidben@chromium.org>
CC: Ilari Liusvaara <ilariliusvaara@welho.com>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Thread-Topic: Stream limits draft posted
Thread-Index: AQHaEMKGGBomZjbnfE6debaMhBum9rBwImuAgANsRoCAATdegIAAC/aAgAKT2ACAAQ/Ys4AB7EKAgAE7CPc=
Date: Wed, 15 Nov 2023 17:00:55 +0000
Message-ID: <BN8PR15MB32817C22061C8AAEB0F66CCEB3B1A@BN8PR15MB3281.namprd15.prod.outlook.com>
References: <14d520c2-8c07-4c30-bd54-faa4ad964a6a@app.fastmail.com> <CANatvzwQ3hD9-+5rUo8Fi_zaHSmDBWv8HaJGPHOihT4qf8xs1Q@mail.gmail.com> <0DE80F27-85C7-4F5C-B04D-316F9C8B7DF5@eissing.org> <dad05307-306a-4d15-9c54-899f3f778c0a@app.fastmail.com> <ZU88Y3q3zQNEku_G@LK-Perkele-VII2.locald> <CAF8qwaDK5y0=d3q7_V0R+Nv3buSoxH0-wGTt=PTpbcQ-snM=cA@mail.gmail.com> <BN8PR15MB3281A9315859245030BDFE0FB3B3A@BN8PR15MB3281.namprd15.prod.outlook.com> <CAF8qwaBg8d_QP+kdRFz=-qMW7MSLqXcrF2LHTKy3kXt=MbCC3g@mail.gmail.com>
In-Reply-To: <CAF8qwaBg8d_QP+kdRFz=-qMW7MSLqXcrF2LHTKy3kXt=MbCC3g@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels:
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: BN8PR15MB3281:EE_|DM4PR15MB5454:EE_
x-ms-office365-filtering-correlation-id: a72e0139-d12b-4fcd-18ae-08dbe5fc6ef4
x-fb-source: Internal
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: eJJ3ZK5lKs27CUAqZnpk2WXD6P8vma65Ew0YL6pQud6ku89byBARVf5gkK+VgXu/ZX+YAMSR/TrnNvfNb7I6UtDaO1OmQbwliBIWN6AvwvWzDpPFfmD0pqcoVu1BIk1CzML9spqw7EMitEN+4XIXYQ7asJs4HWG58CqujPGZKnrf2jpxeXUNwPuIE88c01SiDpMv2ZwdUgd8poeP0+tR0sh4zmCHny66NgIIS9hret1cAZdWhtgHQI7HzbFUdHUQRd69ugYMu9iZsqBOuX4jfihJocK7YFlq82tDr8P6+3RZxuJzdp1u1lhkBBOPIZo1QGKydAujPLrl6GKbrZRfdE8XLSITa7zJeibEg2nT06VBq3VhQuK6jAghzZ73Ihqt+ewPfEzIS/Wvrxga8/i7A1VY3hE52jKdQPh+KNNMoEWWo9o+UypH8Quu2sfZb3mR2DKxYpEgsBPFt3axcVOarTkkRXpC1spJsZsc1Acz0B2g65sYI4PIomZIr8yzNxUXQ3y0RZtMPBJFhLn1fJAwuLqzj4gQjFyF6DbEMKVAPckoGdoa3+4pZEONt11RCw5W500MzZpXzvmMcu5f3XGym+/Frc0Y5+HB9r2emEJdclADgxBxBh6AAOdNQiL7e+UuD16342B7FthEAetPTdt/zQ==
x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR15MB3281.namprd15.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(39860400002)(366004)(396003)(376002)(136003)(230922051799003)(230173577357003)(230273577357003)(451199024)(64100799003)(186009)(1800799009)(55016003)(19627405001)(66899024)(66556008)(6916009)(76116006)(66446008)(64756008)(54906003)(66946007)(66476007)(166002)(122000001)(33656002)(38070700009)(86362001)(38100700002)(91956017)(83380400001)(9686003)(3480700007)(8676002)(6506007)(71200400001)(7696005)(53546011)(66574015)(41300700001)(966005)(478600001)(316002)(4326008)(2906002)(8936002)(5660300002)(21615005)(52536014);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: VtZz48XpzrTbRgIWY659TSCTd3Xnttoahr+df1Vx5kiGCiSbtLMTz4oEqCrG+y3b6LQlZRbDKNSQhI1szyZ5/dNBt6YRLdn+9ZimuM9MuTDTt352jT29UulRaJEb2lxW1iwq98xZmpW4O/yHXWPSjrH3LLs0SEBmwX8jkPxteLPAsjd258aIVhvffauWnrH5hc3Hb/1vSaOTRLZvdIYy1h29SnlRNW98za4vzWMY0HLuK6pgBTAI4PNHTiNtsJi6Xkt0mG9/v2fllDP5QTGfwRefj7QsPsemesi6/WnrjlTCeBnLotgbNTCBSqCfNxFY9vUcudctF1u2E+5W+erhRYeB3SlQGuiAAb33eAbMDa9PDvjrTyZspZI6UMXz7WZaLfgOFOgN4vWQ2ehL+6I2EU+n9PdysHTDRoNFralnvksA1ziU/sTdKN3BRYGAioOKy7JlV8RpGvuKCKe4Zut05t4NJ7mT1bCf2dgvg2GcvXNXOrn8dLzigR7QN1B6D5ZjU9sQKbWjfUgP78Ei4barxTFgCRIZRhqpKWt6u66nw4pismHrHGSW+nbO4k5W8K61NClpwRtj/prCQ1lFqSqSUU5DBM9TXRue5UhWorwQsVXnmxHrqlVth0bvVevakHRUYu5fInsOcKjcRmLP/U9XoCcskzMfheSYSnve8fDVPGJTqVJ2JgaeYKW8h3XO7Kjr9KVXcjh6GMtHDuA3uWdTVqSVv1PZ8E6TRPei9onzAYVNxsePmdyDNcVdgCDBCXXOmlVsoz1Gr6jkHy/y7phgN7seV2Fajk3MAosAKBVZB4FGX8YtWsFL0cQu16CuGr7jrYMqVn8u2cwCmAHBaZIwC/WproFK7CUU5TDAcfSkFK0gsIxtRb0m4dk7L4KbfEazu85rbdLCgISh9QAqgHvyNICc/G1T/xowkGm+UVr5tEtqeXgEPBkAbWNFusT1GuPiE49GhqcEN67FW8nnhXfYpHTjC5lBL3yt2LfMeoMvcCEmYD3VzRPIYYkWuKsAPm4zMFgHfWVDr/G+VdtGu6lFYdC3x3mu2cmbj8wCmwOYrDIl1ab4fAO0mpxsQugiHOtGKKaNI5LSxbWBLPaqwf0EkCZERanPp2+z0j7a8/6Tu8Ad4rLCeJlhtJjCsKo7bj8RUuXDEmlQD1el1mOAHH+pyEKS6dN3JiSn9TdvYM4mHIlPrb1+gvJS6DEQWTY47FfN9FiDZKLYIjyVUphOqikkK8ZxSWAXUI9OuCv1ZBwVJgELCa7ncklUNBbdxXsq354zEKCgnQdJ0ipW8JMhuY5tsEGp+B7NjvrqUkdAA05K+q27/+hKnO3t6YqnuFKGzit2toQTA9T6HQixun68wotIW++rZl172Z4uTzaUG4jW9v0upG8EAMfBFVNY7W4Yujjgq6gm2KDHZqWmsmOJojbbhSCHAmxks8w9N3TP/EB5qjX5D60SgaJyXuBTmhioJUoEb47J6b8zK80QNaLguAygWStZZajLIaucW7DpdfIq53XaFZXuyzUMzePVOj7jOxudjCZWm2gxO+V3sFO4ifOun9CZiMdGaJgMPjcKv/dnpwdqtDWWQqpGDfoixVxPSeLG
Content-Type: multipart/alternative; boundary="_000_BN8PR15MB32817C22061C8AAEB0F66CCEB3B1ABN8PR15MB3281namp_"
X-OriginatorOrg: meta.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: BN8PR15MB3281.namprd15.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: a72e0139-d12b-4fcd-18ae-08dbe5fc6ef4
X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Nov 2023 17:00:55.8744 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: kdgrfzALWghMwTXWYySi6Cy2cI7OAAh35WnScfS16tDzwrGq83RTaN0eGex9uIHi
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR15MB5454
X-Proofpoint-ORIG-GUID: pBRVi5gY0WePxYjsoiZvwK555jSMnkTD
X-Proofpoint-GUID: pBRVi5gY0WePxYjsoiZvwK555jSMnkTD
X-Proofpoint-UnRewURL: 2 URL's were un-rewritten
MIME-Version: 1.0
X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-15_16,2023-11-15_01,2023-05-22_02
Received-SPF: pass client-ip=67.231.145.42; envelope-from=prvs=46836bc5ef=bemasc@meta.com; helo=mx0a-00082601.pphosted.com
X-W3C-Hub-DKIM-Status: validation passed: (address=prvs=46836bc5ef=bemasc@meta.com domain=meta.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-4.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, HTML_FONT_LOW_CONTRAST=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_KAM_HTML_FONT_INVALID=0.01, T_SCC_BODY_TEXT_LINE=-0.01, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1r3JGF-00C8nW-2o b05e0ee4ea2f22cfd9c51eb4d1bf1ae4
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Stream limits draft posted
Archived-At: <https://www.w3.org/mid/BN8PR15MB32817C22061C8AAEB0F66CCEB3B1A@BN8PR15MB3281.namprd15.prod.outlook.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/51601
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/email/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

If we truly believe that "fixed H2 only" is a behavior we want to endorse for both clients and servers, a new ALPN seems appropriate.  However, that possibility comes with a variety of headaches, and I think we should try to avoid it.

Consider a DoH server that only supports "h2.1" and "h3".  (DoH explicitly rules out HTTP/1.1.)  A (standards-compliant) DoH client that only supports "h2" would fail to connect.

Conversely, imagine a far future when "broken H2" is mostly forgotten, and clients start to drop support for "h2".  It's not enough to update your servers to support "h2.1" (which could have happened automatically via software upgrade): you also need to update your HTTPS records (which is likely manual).

Defining a new ALPN seems likely to generate a large amount of operational toil and compatibility stress.  I think we would be better off avoiding a compatibility break, by (1) defining an in-band optional upgrade like ALPS and (2) documenting HTTP/2 server behaviors required to make the baseline protocol sufficiently safe.  (A recommendation for the HAProxy rule [1] might be all we really need.)

--Ben Schwartz

[1] https://lists.w3.org/Archives/Public/ietf-http-wg/2023OctDec/0027.html
________________________________
From: David Benjamin <davidben@chromium.org>
Sent: Tuesday, November 14, 2023 4:30 PM
To: Ben Schwartz <bemasc@meta.com>
Cc: Ilari Liusvaara <ilariliusvaara@welho.com>; ietf-http-wg@w3.org <ietf-http-wg@w3.org>
Subject: Re: Stream limits draft posted

Can you elaborate on the compatibility and configuration issues? h2. 1-only clients is a good example of why the weird implicit ALPS thing isn't ideal. It allows a server to say "I'm willing to do fixed-h2 but not broken-h2",
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender

ZjQcmQRYFpfptBannerEnd
Can you elaborate on the compatibility and configuration issues? h2.1-only clients is a good example of why the weird implicit ALPS thing isn't ideal. It allows a server to say "I'm willing to do fixed-h2 but not broken-h2", but it doesn't allow a client to say this. Less of a serious concern than the server, but it's something we give up by losing the orthogonality.

I also think this allergy towards minting ALPNs is bad for the evolvability of our protocols. There are plenty of problems where minting a new ALPN is the right solution. If we have systems that cannot handle it, that's a problem and we should exercise them better and fix this. Otherwise we'll have ossified yet another extension point.

On Mon, Nov 13, 2023 at 11:30 AM Ben Schwartz <bemasc@meta.com<mailto:bemasc@meta.com>> wrote:
If ALPS is in use, I think a new ALPN ID is unnecessary.  ALPS implicitly defines a new profile of each offered ALPN.  We can define a SETTINGS_USE_MAX_STREAMS setting for H2, and note that client support for this setting (and any other settings that we believe should be in a "modern" client baseline) is mandatory when offering ALPS for "h2".

This does move toward ALPS influencing the server's ALPN selection.  Perhaps that is less elegant than perfect orthogonality, but I think it's better than minting new ALPN IDs.  In particular, a new ALPN ID creates various compatibility and configuration headaches related to "h2.1-only" clients and servers, and HTTPS records.

--Ben Schwartz
________________________________
From: David Benjamin <davidben@chromium.org<mailto:davidben@chromium.org>>
Sent: Sunday, November 12, 2023 6:55 PM
To: Ilari Liusvaara <ilariliusvaara@welho.com<mailto:ilariliusvaara@welho.com>>
Cc: ietf-http-wg@w3.org<mailto:ietf-http-wg@w3.org> <ietf-http-wg@w3.org<mailto:ietf-http-wg@w3.org>>
Subject: Re: Stream limits draft posted

Even over TLS 1. 3, I would expect the vast, vast majority of HTTP/2 servers do not send SETTINGS at half-RTT. When I probed some list of top sites in 2020, I could not find a single one. This should not be surprising once you dig into it. Half-RTT
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender

ZjQcmQRYFpfptBannerEnd
Even over TLS 1.3, I would expect the vast, vast majority of HTTP/2 servers do not send SETTINGS at half-RTT. When I probed some list of top sites in 2020, I could not find a single one.

This should not be surprising once you dig into it. Half-RTT data on a 1-RTT handshake is semantically weird, in a way that half-RTT on a 0-RTT handshake is not. It really does not fit well into TLS-over-TCP's existing interfaces at all.On the client side, taking a 1-RTT hit against practically all existing HTTP/2 servers seems clearly an unreasonable performance cost. Ultimately, it is a change in protocol semantics to go from "sending SETTINGS at 1-RTT is just fine" to "SETTINGS must be sent at half-RTT to avoid latency problems". On the server side, I don't believe it's possible to send it with OpenSSL servers. BoringSSL too, which was an intentional choice on our part.

I wrote this a couple years ago, which discusses this and other problems with trying to solve this shape of problem with half-RTT:
https://www.ietf.org/archive/id/draft-davidben-tls-alps-half-rtt-00.html<https://www.ietf.org/archive/id/draft-davidben-tls-alps-half-rtt-00.html>

I haven't been following this issue as closely, but skimming the draft, it seems to me three questions here:
1. How to ensure clients know to trigger the new mode early enough.
2. How to allow clients to open streams in the new mode without waiting for an RTT, in both 1-RTT and 0-RTT handshakes.
3. How to distinguish clients that do and don't implement the new scheme so that, either under load or perhaps unconditionally in the future, servers can avoid negotiating h2 with older clients.

I suspect any solution for (2) will either look like early server->client communication (be it ALPS or a Rube Goldberg of half-RTT, 0-RTT session ticket state, and applications injecting themselves into the 0-RTT accept/reject decision), or, as Kazuho suggested, just some hard-coded initial default value. Both the ALPS and half-RTT plans will require TLS software changes, so I suspect the hard-coded initial value is most viable, provided we can find a small enough default to satisfy DoS concerns, but large enough to admit one RTT worth of stream creations.

But then we don't solve (1) for free. For that, I think the new ALPN is the way to go. As this is essentially a protocol bugfix, rather than an optional extension, a version bump to "h2.1" seems appropriate.  ALPN happens early enough, and is already correctly integrated with 0-RTT, so the client will know, before sending data, to use the new mode. Moreover, the server knows whether the client will behave before picking the protocol, so we get (3) as well, which the half-RTT and ALPS options would not give us. (ALPS puts the client message in the second client flight so that it is encrypted. That means the server only knows "client supports ALPS" at protocol selection time. It also was designed assuming it wouldn't impact protocol selection.)

The hardcoded default is a little unsatisfying compared to early server->client, but we could do both: if we get a server->client initial value in ALPS, use that. Otherwise, use the hard-coded default. (This isn't an option with half-RTT because the client needs to know when to stop waiting, when talking to a server that can't send it.)

(To fully explore the problem space, a new ALPN does resolve the client performance problems of the half-RTT approach: with a new ALPN we can say "you must send SETTINGS in half-RTT in h2.1". But all the other problems, such as those in the link and requiring TLS library changes, remain. I do not think half-RTT is viable here.)

On Sat, Nov 11, 2023 at 3:37 AM Ilari Liusvaara <ilariliusvaara@welho.com<mailto:ilariliusvaara@welho.com>> wrote:
On Sat, Nov 11, 2023 at 08:50:51AM +0100, Martin Thomson wrote:
> On Fri, Nov 10, 2023, at 14:16, Stefan Eissing wrote:
> > +1
> >
> > I think clients will not wait for the MAX_STREAMS from the server. I
> > assume they want to send right away instead of waiting for a while. The
> > server might support it or not. How long are they willing to wait for
> > this?
>
> In the meeting, it was suggested that we require clients to wait for
> SETTINGS before opening streams.  I think that is a good idea and
> entirely possible, without significant performance penalties.
>
> In TLS 1.3, the server can send SETTINGS immediately, which means that
> the client only needs to read a few more bytes before it can start
> sending.
>
> The minor pain here, as David Benjamin will likely remind us, is that
> it is a little awkward sending data from the server before seeing the
> client Finished.  So we'd probably want to experiment here.

I have written a HTTP reverse proxy, which used to send SETTINGS
immediately in TLS 1.3[1]. Unfortunately, that caused some clients to
break[2], manifesting as fatal unexpected_message TLS alert immediately
after handshake completed. So I changed the code to always wait for
finished from client[3].


[1] If there was no client certificate request, for shortcomings of
the interface between TLS and HTTP layers.

[2] No information about what clients broke. However, mentions by
one user might indicate that some "anti-virus" products were
involved.

[3] There might still be option to re-enable the old behavior.




-Ilari