Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125897 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 DD3AB1A00BD for ; Mon, 4 Nov 2024 11:45:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1730720900; bh=/TCZ6rYN960n8RVjIlD4NvbvI49+R2IlkdvLw6jQiFA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DS++N21N3ovSkGBG1CG8FAGoyqcK5ycsw1eVWx4MMVqE0MD7NkbRjDoF9WUllBDAP Bs6pG3WPN0kK63/zOO8aTp8u4v23eWu3IJNK8OfcmcQjebUoURzFt37a7VuvTCm4/B wP5Lcora/uo8HS3Dg0NzIhvPNtVsWdwUFkGCMmZX8wewHm5IiZdwTrYVoAZBc5joF2 avdDa2sWRUcmG17Wg+9NM/WoumwU5tBuTzxvBu7Uj+hQXCeDwUUbVvsYTYyxYTy8tG BwQOsHibEKgsnc+Ep1Aj0CpI17u8yfnYZPbMPvvem36ZtRmPoHkTK4PMFSDWEVpQkp 21AXkeNCGaGfA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id BFDAA1801D9 for ; Mon, 4 Nov 2024 11:48:18 +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,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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 ; Mon, 4 Nov 2024 11:48:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1730720744; bh=lciqtu3SuhuTdYEJoSeM3ww/MNRXpfistyI6Pbq+q0I=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=MSvYAOCH5BlnSNxBWIsiPP3FupvWKjwvFidprLrBLh6JUjnmHJIw2lGmagF3VR/YJ jS9mqJTvJKW0z9gk4JUMHjkQU3BSlMKnGws0fnR4OEwQ/qeXQiIf1GlLdjxUnKoJGs r3B+LV55Drhloq0J7Luq6zs49Kr5O0dE1ekKE2aCEFaezvZydJpiSg4iW+mCGrAnGu 66JunTF3e0HezxHYde7NKpjcHVVfXzU7c3hpusltPe8qS9+dKeudRcjowt8111gqrh 771cGNOvNMNaS5zieHIZygfEPtLcqHSGhLY5WvL1CCQfhZoY/JlYWqbwY5SIep8BlE ALWxShsq3NKCA== Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Mon, 04 Nov 2024 12:45:44 +0100 To: erictnorris@gmail.com Cc: PHP internals Subject: Re: [PHP-DEV] [RFC] [Discussion] Persistent CurlShareHandle objects In-Reply-To: References: Message-ID: <607343457a1acb7450ce3cd4e24f1648@bastelstu.be> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi Am 2024-11-01 21:07, schrieb Eric Norris: > really any major issues that this can cause. We already support curl > share handles via curl_share_init, and adding persistence doesn't > fundamentally change the issues you may have with reusing a curl Yes, it does. See the reply that I just sent in the voting thread. >> Persistent handlers don't really fit PHP's model, and are practically >> untestable from a PHPT test perspective as far as I know (at least I >> have never seen any proper tests for the existing ones, but I am happy >> to be corrected). > > Persistence is important to successfully scaling Etsy's monolithic PHP > application. As I mentioned in a response to Tim, we make use of > persistence for things like memcached connections in order to reduce > end-user latency, and we'd like to take that further by persisting the > connections of downstream curl requests we make. As far as I know the memcache protocol is stateless - except possibly for authentication. In that case every connection would be equal / immutable, making it safe to reuse. MySQL - as an example - is different, because changing any of the connection-related variables, e.g. with `SET sql_mode='foo'` might ruin your day for follow-up connections. > If we truly feel that persistence is wrong for PHP, we would need to > deprecate and remove things like persistent PDO connections; I would > expect that would be a perfectly fine time to also remove support for > persistent curl share handles, if they existed. I believe that *stateful* persistence is wrong and will lead to hard-to-debug situations sooner or later, yes. Best regards Tim Düsterhus