Req #71832 [Com]: Support for persistent connections
Edit report at https://bugs.php.net/bug.php?id=71832&edit=1
ID: 71832
Comment by: rmoisto at gmail dot com
Reported by: rmoisto at gmail dot com
Summary: Support for persistent connections
Status: Open
Type: Feature/Change Request
Package: cURL related
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
As a workaround I'm in the process of building an nginx reverse proxy that can hold persistent
connections. The performance gains for EU - US connections are massive. Even with the nginx proxy
overhead requests are on average 900 ms faster.
Previous Comments:
------------------------------------------------------------------------
[2016-03-15 19:39:05] rmoisto at gmail dot com
Description:
------------
There should be a way of persisting and caching cURL http(s) connections between requests.
Trying to find a solution, it seems the nature of PHP doesn't currently allow for this in any
way, without writing an extension of course. Every time a request comes in I have to create a new
cURL handle and therefore a new connection at least once.
It's a big performance issue on proxy systems like what I'm working on. For example even
in my very fast local network the time spent establishing a connection is around 60 ms.
The issue and solution are much better explained in the description of an extension that only exists
for hvvm:
https://github.com/mobfox/hhvm_ext_pcurl
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71832&edit=1
Thread (9 messages)