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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to