HTTP client: Expose maximum time to keep alive idle connection with persistent connections
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with src/Io/ClientConnectionManager.php, where $maximumTimeToKeepAliveIdleConnection is defined, then trace how the client, transaction, and sender objects expose connection configuration. Done means the maximum idle-connection time can be configured for persistent HTTP client communication without requiring direct edits to the connection manager.
Written by the indexing model from the issue text.
Description
Hi there!
Good job with taking care of https://github.com/reactphp/http/issues/468. Having the ability to use persistent connections is definitely a game changer for some use cases!
I was wondering if it would be a good idea to expose the $maximumTimeToKeepAliveIdleConnection variable (https://github.com/reactphp/http/blob/1.x/src/Io/ClientConnectionManager.php line 39) in order to support ongoing communication with a webserver, especially with REST API and architectures such as OpenResty.
I'm aware it represents some work as a lot of objects have to be exposed (client, transaction, sender, etc.), but I was wondering if it would be worth it for that particular use case. I noticed an improvement of 100ms per chained request on average by changing the timeout from 1ms to 10s.
Is there a reason why connections are considered idle only under 1ms? I think it might be too low (which is the reason why I'm flagging this as an issue and not a suggestion).
Thanks a lot for ReactPHP!
- Dominant language
- PHP
- Stars
- 781
- Forks
- 166
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from reactphp/http
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 76/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
maintenance
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
new feature
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
help wanted new feature
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getgrav/grav-plugin-api#45 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RSS-Bridge/rss-bridge#5098 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
phingofficial/phing#2025 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
silverstripe/developer-docs#911 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100