Re: Stream limits draft posted

Ben Schwartz <bemasc@meta.com> Mon, 13 November 2023 17:06 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 75130C1522D3 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 13 Nov 2023 09:06:38 -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_DNSWL_NONE=-0.0001, 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 Y9eMi3J9lN1m for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 13 Nov 2023 09:06:34 -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 8267BC1519BF for <httpbisa-archive-bis2Juki@ietf.org>; Mon, 13 Nov 2023 09:06:33 -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 1r2Zq3-00ETdd-CH for ietf-http-wg-dist@listhub.w3.org; Mon, 13 Nov 2023 16:31:03 +0000
Resent-Date: Mon, 13 Nov 2023 16:31:03 +0000
Resent-Message-Id: <E1r2Zq3-00ETdd-CH@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=4681a81660=bemasc@meta.com>) id 1r2Zq0-00ETbk-Hz for ietf-http-wg@listhub.w3.org; Mon, 13 Nov 2023 16:31:00 +0000
Received: from mx0b-00082601.pphosted.com ([67.231.153.30]) by mimas.w3.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <prvs=4681a81660=bemasc@meta.com>) id 1r2Zpt-00B4zf-5r for ietf-http-wg@w3.org; Mon, 13 Nov 2023 16:31:00 +0000
Received: from pps.filterd (m0109331.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3ADEFirS023457; Mon, 13 Nov 2023 08:30:48 -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=LJfd+rVexvSl67PwpZU4lrRgrnAEby63J7QoIHvWa9A=; b=IVHfLhvopgjFJ8wSBmhwFkm1EnVoB6ZTs7a+DO9a2x700UIAZVY4bF1skuSCkv+QBr+d 5ghR1NxbrSpoyjEXjc8pYAZNvWJ3DTd6unjPQZGkfHMvJrNZHjOssNE21Fb25nxiVdcZ g+NfKnGmS4DmzB1caltonKcCj1CdmYGSYGiOi2u2A1z39BAEHOcCF6M+FHMAbXHHc5JR JK5KngoGTmsI5kJtkpe1OvfskX1kFNhtL+9Ote6aJROZm1XLU5fxxyATP+0lYF/hWvjn KxeW61uzBXSoaApfq9+WB72JAgOZNzPNOQm5p9t1LLS+daRQ7l9PUyTD52EGYcjf/f5Y /A==
Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2169.outbound.protection.outlook.com [104.47.56.169]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3ub46evfw2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Nov 2023 08:30:47 -0800
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nwyol2EI3liQRzITFuco/0BmNFaGgaFDFymTgbMQQGEuF1BofwzG+2rr8giAFtJ9NiuQM+vsd2qyEqmBfFWIxHK5v8JLoqb6gwwzMftAoZG72qi4Tbhmupem6igExIqELVW0MdEWtrkaIPGhBJ/HOGTxEvaPClUXcGQtG5B4XsR93HVRMGNM/Ut+4isAaQ5+schNmTiFByE7xeOD2ShHyziO66XZPYpGndMdbLH3zoCseDFDGjIDp8gw4fSTXuZw00M1a/amJ8RuGJgM0OwM3hsBvSrwIF+rKU4yf5op9eZTY76FHeKnVbNSyVzKi24A+dTowo6PYaarYyMEVqv5sw==
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=ccSNyHh4i5G211sp/WvEez+iThANIowd+TdcmnTmDDo=; b=Hj874dx2ADGY0is5tiABETD9dr1o/hhQfujS88GM7x5q4sPnNA2IkCUBuT4C+jIFVHXQ5UTFoTNeCR1pBg74dzcKA5C8WNud7XRvg8GtLbosGLwfD/Y7cJAnvp9Tu8NwAHGb5Cnrf2dtFNaQU8EvS04W6cWKjEO4YEhs/AHXUDeYqb4YuZUpb+UoXCG6Ljt1TmGSiHYTXs5E5+TP8nbVy6T+ifwSZMGqFTBYBAlHXTQpD0gb8gOTcAAo30DXrFubMWPcj+i14bx6enxRL6cLMuCluJAuro70fu7NJeT5zDdAmLD8j6lPVj5tBa7ggXRXx0yCVRh/ZCaC6EPfF6ZeIQ==
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 DS0PR15MB6066.namprd15.prod.outlook.com (2603:10b6:8:123::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.15; Mon, 13 Nov 2023 16:30:45 +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.7002.015; Mon, 13 Nov 2023 16:30:45 +0000
From: Ben Schwartz <bemasc@meta.com>
To: David Benjamin <davidben@chromium.org>, Ilari Liusvaara <ilariliusvaara@welho.com>
CC: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Thread-Topic: Stream limits draft posted
Thread-Index: AQHaEMKGGBomZjbnfE6debaMhBum9rBwImuAgANsRoCAATdegIAAC/aAgAKT2ACAAQ/Ysw==
Date: Mon, 13 Nov 2023 16:30:45 +0000
Message-ID: <BN8PR15MB3281A9315859245030BDFE0FB3B3A@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>
In-Reply-To: <CAF8qwaDK5y0=d3q7_V0R+Nv3buSoxH0-wGTt=PTpbcQ-snM=cA@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_|DS0PR15MB6066:EE_
x-ms-office365-filtering-correlation-id: 60fab2a0-7169-4c41-1761-08dbe465e2d9
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: /Uc8EBphLt1n99hTCM3tPSOTUm0jOdJOs/aQGmpLWGcCFThkSkFZTNKxj/fa2maEMk6knqBjQpw/Q6edumq47NkxuDQyjOlCwrpZp5e1CGCS52zIhuFflwoQDGMiJp+AXyvds0lReCnu3zqzMNbtX4GCiWAxE+YQhN31cgJl1tESQRRBzogW0J8fI0tIW/nGUpPbwdbIHNlKh9HuLv1r9LlGBIHVhg1X0/Ry9qtCTD4PtWh9dOVfKqiAHRPVWDwm03xOqU3CDQRCkVTiK+AhFGyhEYGm33aPiBcIbtXb98b1vNVxZ7tT1jPlZvwtcXHf6M6rrEFETesZ8jy7x0dAGyXBx/cUrt8vF3AiLYOXxttCz8CFHKxq5M2PwXEkFJK6+FmntNsnchzH0dafFJUidIBdb3VIoSa+iMegOSbgaBADc+M957kFDkX7+RG9Fa5b0J0j7xKhOpsJ4Yznhjumrc5Kwx1aObm7bANl6RjsEcwR8Zkk4M5uEaQtUo4zb8s6/63cmQAfV1r7eNpR+PYY6N2tgJ0X2SCSSPeEhyDYTMfvHWW6rmcgC3772vANvo5TqXmt/S7SFdlMSsxyHrQVC5dlka2S7LmA1RFFEvI6GVBbuiBP3j1rFqrCoOioZ5DWhkJ3tL+yKQ9JaTJrGqsR6Q==
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)(39860400002)(136003)(376002)(346002)(396003)(366004)(230922051799003)(230273577357003)(230173577357003)(186009)(64100799003)(451199024)(1800799009)(38100700002)(7696005)(53546011)(3480700007)(9686003)(6506007)(19627405001)(83380400001)(55016003)(122000001)(166002)(66574015)(966005)(478600001)(71200400001)(110136005)(91956017)(66899024)(66946007)(76116006)(66446008)(64756008)(66476007)(316002)(66556008)(33656002)(41300700001)(8676002)(4326008)(8936002)(2906002)(38070700009)(52536014)(86362001)(5660300002);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: Y6snfSN5az1GCtvBKzHTNYmxy8A5C0ImxLjcVC/AKxcKhWYhCLF3NByQfyzTKzM1qsJoUvarE5+brT6a1G0kX48fIy8vlkEt4o2aBOuUUZP88El8Te/ChTVBh3/o8ZI4jBSLWrNG4+Yl/tdChVmpgwDpcGm0y8TN9dda85R4pgV3uWxTqvPet1FYt3j0yxBw/kxv7jXWKRyJYyZYKOjYxuwEbn2Dz4kXl+Mj+Ou/EzMvqRt+puJkoXSAtrmVdVmmibDAUoYnjFctaZW+CzgEnMVjlvzXPrpZHu+ARMMkQNPkDT+Mz6JqVWZUoaP659LuICkWInhkyWEV5SlR3l74sLZnyUIlr2D2ivlK/HEUJkMsvTyHUkJ2UQM4vHcmw2U/UVHt87FEyr62AcqMMqkSXuiPEMhR0YvdhNxUo4EC9nbdsjInwcm/o3SucRBW31wWCnZQ3fmy1eZJK95umo4wJcbXyvzQr7any/NMcy0FUGQvDOBHMsoffLcl6/GwNpqrrffgjHMdcvGDh80Np3M78kymK67z0V2BMb76yQAfX4M3iV/B3KZh1R8CxR5VEC/PCtpEyra1+5oHeDIU6KR27tHVZqkuhRoxTjC6OYgF9pJQIoqkSPhFc+jjWYZtYSPoX+OwZPJLhTpwzSSuVhOTcoM5/cAkIbBx90ga3UYZFllKRRNYmnsaMdCgvwTKmS6p/QVLVX0iGhtohahuOtrOv4oBCfzrleUOYPETJyc2GxXwxVfBFbxId7hve/SE8MXfsdeWFLyTnQBQaU7Ow7S5wJuMiKyfQY6i/7/JqHuUcNOrnPp9l5UMDXjyuFydyNI8vOUdb4jW1t6qfXloTRZQe/WTrCrHOF7SPu+5Fqm/8RhNbIHPmsZ+cyTawSnIQOzHqKEvSA9fDdprjAOv/ZB4rFOxSYp09a7bgNDxk4slnRW15O7C4XaVVhHSdP/OfcshhcsLJ2Ia9Yyfc037RZNd9qJ6cHF8kPmSPXlq8MPCxRp6gu9rJ4MSgnPcQnjsXa34RRm+sgkYTpLdBrb0FsB5Q/TqzdbrQ4HCcNID5Ka63OJL1qFdGzAI4KNEwdxtEf/BWqECHuDEaXxnoNkP3ltYr+GLt6uHgOCW/lR32htAjJCtjyBanovTLl2VMIBUngOMfEdaT9nsEAENFqNqLiB/mXhSN2I6/07eKIL2zTAnUpyKy2feuDNhA1SZgxbGZjOCh1LEGXlI2PyXRjIRKZ+7Aoerj4I0CVa1lEQBPgrRUjUc5CgMJSpXeNS3pWZa8OupQLjAvg8BGbjdh4QaiugId6pJOjyryYF3vNyM9HSIsEAVTfjjcYbB6uVcMezSfo81N33lW/ONLi18289D9//zdRTY9iUZHfR1sWmsfOFfsAmrwjQa4TTCTS1Dvhau2qT3u4LGT5I02iRjOfKu0BkVWM0rBsCyHV1CdSQFdA/6pMbsPI8SgQSZG8/+B6FslwYX4QC4mgkd8VlMDjui9OhOe5O5lJ+i9dmzQnOjegJfXxj9Vz/d5XYmme03q+ijSZouLT/ufgu2zmZlJU3ny0wWpXKtpYmh3mLquRAfWAczbtW3DEd7RwVRqO9SkDZRKsSg
Content-Type: multipart/alternative; boundary="_000_BN8PR15MB3281A9315859245030BDFE0FB3B3ABN8PR15MB3281namp_"
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: 60fab2a0-7169-4c41-1761-08dbe465e2d9
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Nov 2023 16:30:45.1155 (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: TmOUxX9IHEysam+PsOdFRtBO/WVYz42KQDo2g92wmMkOOhcf2Z/ApS1qgHH61jpE
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR15MB6066
X-Proofpoint-GUID: nuNdB9CbuohPC9OkEUjbtEZxsKyJLhLy
X-Proofpoint-ORIG-GUID: nuNdB9CbuohPC9OkEUjbtEZxsKyJLhLy
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-13_06,2023-11-09_01,2023-05-22_02
Received-SPF: pass client-ip=67.231.153.30; envelope-from=prvs=4681a81660=bemasc@meta.com; helo=mx0b-00082601.pphosted.com
X-W3C-Hub-DKIM-Status: validation passed: (address=prvs=4681a81660=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, 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 1r2Zpt-00B4zf-5r 3d94fdf87ed8e0045632807274ef8402
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Stream limits draft posted
Archived-At: <https://www.w3.org/mid/BN8PR15MB3281A9315859245030BDFE0FB3B3A@BN8PR15MB3281.namprd15.prod.outlook.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/51595
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 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>
Sent: Sunday, November 12, 2023 6:55 PM
To: Ilari Liusvaara <ilariliusvaara@welho.com>
Cc: ietf-http-wg@w3.org <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