Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82280 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47862 invoked from network); 9 Feb 2015 13:51:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Feb 2015 13:51:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=mike.php.net@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=mike.php.net@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.178 as permitted sender) X-PHP-List-Original-Sender: mike.php.net@gmail.com X-Host-Fingerprint: 74.125.82.178 mail-we0-f178.google.com Received: from [74.125.82.178] ([74.125.82.178:58778] helo=mail-we0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A7/13-50460-D6BB8D45 for ; Mon, 09 Feb 2015 08:51:43 -0500 Received: by mail-we0-f178.google.com with SMTP id w62so9564225wes.9 for ; Mon, 09 Feb 2015 05:51:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=e1Xp397eFWOnRyM4+6z9/OS6Wv5c/9U2tEi0OU1a+go=; b=MjGGv22J32RwFj6QHHej9XvGGHzD2n3qW/FsUYDuUAuF9R5XV/xRWCVGY+lybT+osS bK9saJGWzigYK1nl/MYfnwbpOcCleT6EiYwJb6sKc+BywZ//IW2GiQJAOhs5R0o3WuyJ f4qRCasQa0XLb8ATahOKqxx/yDH23I5wyM1Do3n7zl9aXcdr8EjQFafunUc7En7UFcrR o3/3lSmIU7Dy6GaUp+s0Fq0cpUGGd2BprBkwB5VtfmtxLXDMHhK8OWlvSQ8a81eL9MIi hQVXZwlUJb9lnlqcKLRSkaCa+4DVuHSfzE3M+PFlBS0jGy8p0ndeC/9uHzT+m/60CXuO ZYtg== X-Received: by 10.194.21.134 with SMTP id v6mr42169620wje.140.1423489898670; Mon, 09 Feb 2015 05:51:38 -0800 (PST) Received: from [192.168.2.120] (89-104-28-113.customer.bnet.at. [89.104.28.113]) by mx.google.com with ESMTPSA id df8sm5784645wib.2.2015.02.09.05.51.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Feb 2015 05:51:37 -0800 (PST) Sender: Michael Wallner Message-ID: <54D8BB68.5060700@php.net> Date: Mon, 09 Feb 2015 14:51:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Stanislav Malyshev , Pierre Joye CC: PHP internals References: <54D217E7.8030407@php.net> <54D2AE91.8090800@gmail.com> <54D3271E.2080207@php.net> <54D3CE01.4070903@php.net> <54D3D26A.6050405@gmail.com> <54D3D51C.8070108@php.net> <54D3D6A4.3020908@gmail.com> <54D47379.8030409@php.net> <54D7E259.4090702@gmail.com> In-Reply-To: <54D7E259.4090702@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [RFC] [DISCUSSION] pecl_http From: mike@php.net (Michael Wallner) On 08/02/15 23:25, Stanislav Malyshev wrote: > Hi! > >> Are you saying performance is not the reason we use persistent handles? > > It is, for databases where connection setup is expensive. Even then > persistent handles are not always the best solution. But with DB, you > routinely connect to one service, with one set of credentials, and need > this connection constantly. With HTTP, it is rarely the case that you > want to maintain the connection to the same service for an extended time > (like hours or even days). The server dictates this ony you anyway. It's only leveraging Keep-Alive and it is the server that's ultimately deciding whether it allows a connection to stay open for a limited amount of time. > >> Stas, I really don't understand what's the issue here for you. > > The issue is that I think maintaining long-time persistent HTTP > connections (I do not mean keepalive connection that serves a number of > requests within the context of one workload, like browser does) is not a > good idea, in fact it looks suspiciously like a DOS since many HTTP > servers, including Apache, are not equipped properly to handle such > model. While there may be corner cases where it may be useful, > encouraging the practice looks like a mistake to me. There won't be any forced-open connections. Connections won't be cached if the server doesn't support or allow Keep-Alive. Utilizing Keep-Alive is not encouraged per-se, it's just an offer, because it is not enabled by default. -- Regards, Mike