Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125917 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 2E4741A00BD for ; Wed, 6 Nov 2024 11:03:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1730891178; bh=ppE7a468IDmwJtlzledvd/uYvxKRusLCZOF6QzBkuE8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mBAGclpC8hIezBMAn8OPUdn5d2fV0EPeyMFHf8o4kuBwCG54OtHjfg16RfLi56NZi MLn2E7pqNCSI7bjc9RJ5NMLwXE+PJ9Mn03X+AtTaHSzqdl2gy/ebUEV/gu0Ka0JWdR umDacGtDzDBtWLovibP5TwwqQXgbB4hhUbW5dgAb3SZHy+3joYi9QuL6ap3i38ZDE0 Z+H4EED0MAFk0xp+TZWPBEdZ89PsnFI/15X2G51iv5W0SkaJka5rQwnYpuRZusI7lx 5S+wQCUgLp6YzAB5t+GJxa5A7I9b2/yFIpXJL8Bb/QQPn1GCl7r86neOdJ0Vtd46UD JbWMsQ87odNJg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 21868180076 for ; Wed, 6 Nov 2024 11:06:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 6 Nov 2024 11:06:13 +0000 (UTC) Received: by mail-qv1-f47.google.com with SMTP id 6a1803df08f44-6cbf340fccaso5999766d6.1 for ; Wed, 06 Nov 2024 03:03:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730891021; x=1731495821; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ppE7a468IDmwJtlzledvd/uYvxKRusLCZOF6QzBkuE8=; b=k5HjBb3u02WoB42iKVJtISldrq9e6xMT1ixrL1YanJmPLQg5jbSHsbKegcOtkF8SHH yp8nrwdK7WY3EfdPW+bU8plvvUTH8T40rEGZFDbVwBlqMlNpsZGOzdOZzMNXnH7c6Uq+ g4gTyCCJQKI7PceU2HFywCGsxcPyLaiVcVqTDqG1FJpr2j6EaNF1ffRf2jTihdHtFd4F y6GJ9RL9YWf2dch1hF6kcQ3NY1FL197uM7xYwV+b4eb+X9+HWkRSsqdVxW6a9wL3OuFR shuckqwcYybvoZyuI6IBniKiHlIYw4Ir6yaw8Vx9FxxIxC1j+BHArCoSoEenaDpviyfq aB5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730891021; x=1731495821; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ppE7a468IDmwJtlzledvd/uYvxKRusLCZOF6QzBkuE8=; b=WWtQDNgIo/BD1MibgNQQFg1QU5KcTbyG3KEmluydw6kcprrMV9Nn2ZdC6vGy1BtRh5 sfquatLzaYnj/y38yoI/kNgY7Onat/13ppnFKCIjRi60hlmEcVLVCPldR24YTw0kxBPc 5osUVML3a9osCyUkLixl5E0NOSWSigwq6lozCj9bnuWXCYEkEh/8Q2EUdwVHXDYeVKuM qTT6PEoKLcdCwZg5FdJtmY2KppLy05BEVglx3sTy34zp7t0ckR3tnPUYkgHEoqB+GcBt 5/1Q4L+XWQyAEO+2QNMkvka0TQCSbTXgQIE6G8WaRok8UA5nTv++F4SYyld5bLslPbdM z6kQ== X-Gm-Message-State: AOJu0YwAo7aX0OrpQ9s5maT3822Uo7uvMKbTe4uHlv8nPyZysv6up2oY 3XMAOLdyma/Nn3PYL8vNDudrVW5ZB2Juj54zPkXKqua2fIwzfLlwKSj9oP5GDC4M+b5+Vq3fbU7 e/KTfILniykvIRC6dY1iF2P0OZ+3otQ== X-Google-Smtp-Source: AGHT+IHs877zOR18u6GKbdoY2FQNzmwnE4ck15qfLE/PH2jsuUTM3ItRndrCFP8nJxX74Bgy64RqNPWOQMt1eorfjSg= X-Received: by 2002:a05:6214:5192:b0:6cb:9a1c:cfae with SMTP id 6a1803df08f44-6d38b125fbbmr33103056d6.6.1730891020716; Wed, 06 Nov 2024 03:03:40 -0800 (PST) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <6e533102b9a2e9c8f6a2183440b2601a@bastelstu.be> <9dd47a928fd4dc673a137c6433cd3130@bastelstu.be> In-Reply-To: Date: Wed, 6 Nov 2024 11:03:29 +0000 Message-ID: Subject: Re: [PHP-DEV] [VOTE] Add persistent curl share handles To: erictnorris@gmail.com Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000006f526206263c78fd" From: t.carnage@gmail.com (Chris Riley) --0000000000006f526206263c78fd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 5 Nov 2024 at 19:35, Eric Norris wrote: > > > That said, as I mentioned above I would be fine with removing cookie > > > jar persistence if that was necessary to secure a passing vote, since > > > it's not our primary focus. > > > > Given the information regarding the TLS re-use, the cookie sharing is m= y > > only remaining concern. In fact with cookie sharing disabled it might > > not even be necessary for the user to choose an ID: Given that libcurl > > does the heavy lifting, as a user I should only need a single share > > handle and let libcurl figure out the details, no? A boolean =E2=80=9Cs= hare > > connections across requests=E2=80=9D when initializing a CurlHandle sho= uld > > probably sufficient. > > I realized I completely forgot to respond to this point. I had > actually considered this when you first mentioned that you did not > like choosable persistent IDs, but I think we'd need to consider how > this would interact with CURLOPT_MAXCONNECTS. A single shared handle > would mean a user couldn't create separate connection pools, and so it > may cause churn if the pool size wasn't large enough. > I don't think that's an insurmountable problem, however. I will raise > that as a part of a v2 discussion attempt if this fails to pass. > I'm also a bit late to this, but I'm not convinced on the design myself either though from a different direction. To me, persisting connections should be a deployment decision not a development decision; in order to use these new persistent connections I have to change my code to opt into it, or I have to wait for the libraries I'm using to do so. In reality, It'd be much better if PHP could enable or disable persistent connections globally, pools can then be tuned in php.ini per environment. If you were excluding cookies from the store (a good choice as cookies are better handled at user land) and curl already handles SSL related differences, this behaviour can and should be transparent to the calling code - reusing or creating a new connection shouldn't have any impact on how the request/response is processed other than the speed at which things happen. ~C --0000000000006f526206263c78fd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, 5 Nov 2024 at 19:35, Eric Norris = <eric.t.norris@gmail.com&= gt; wrote:
> > That said, as I mentioned above I would be = fine with removing cookie
> > jar persistence if that was necessary to secure a passing vote, s= ince
> > it's not our primary focus.
>
> Given the information regarding the TLS re-use, the cookie sharing is = my
> only remaining concern. In fact with cookie sharing disabled it might<= br> > not even be necessary for the user to choose an ID: Given that libcurl=
> does the heavy lifting, as a user I should only need a single share > handle and let libcurl figure out the details, no? A boolean =E2=80=9C= share
> connections across requests=E2=80=9D when initializing a CurlHandle sh= ould
> probably sufficient.

I realized I completely forgot to respond to this point. I had
actually considered this when you first mentioned that you did not
like choosable persistent IDs, but I think we'd need to consider how this would interact with CURLOPT_MAXCONNECTS. A single shared handle
would mean a user couldn't create separate connection pools, and so it<= br> may cause churn if the pool size wasn't large enough.
I don't think that's an insurmountable problem, however. I will rai= se
that as a part of a v2 discussion attempt if this fails to pass.

I'm also a bit late to this, but I'm not = convinced on the design myself either though from a different direction. To= me, persisting connections should be a deployment decision=C2=A0not a deve= lopment decision; in order to use these new persistent connections I have t= o change my code to opt into it, or I have to wait for the libraries I'= m using to do so. In reality, It'd be much better if PHP could enable o= r disable persistent connections globally, pools can then be tuned in php.i= ni per environment. If you were excluding cookies from the store (a good ch= oice as cookies are better handled at user land) and curl already handles S= SL related differences, this behaviour can and should be transparent to the= calling code - reusing or creating a new connection shouldn't have any= impact on how the request/response is processed other than the speed at wh= ich things happen.

~C
--0000000000006f526206263c78fd--