Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse TCP/IP socket connection and pipeline outgoing queries #147

Merged
merged 1 commit into from Aug 11, 2019

Conversation

@clue
Copy link
Member

@clue clue commented Aug 9, 2019

The TcpTransportExecutor will now keep the TCP/IP socket connection to
the DNS server open for a short period. Additional queries can reuse the
same socket connection and pipeline multiple queries over this single
socket. This avoids creating multiple socket resources for concurrent
requests and implies the TCP/IP connection overhead only applies once
instead of for each query. Among others, this helps avoiding excessive
resources and significantly improves query performance when using
multiple (concurrent) queries.

This implements RFC 7766 as per https://tools.ietf.org/html/rfc7766
Builds on top of #145
Refs #19

@clue clue added this to the v1.2.0 milestone Aug 9, 2019
@clue
Copy link
Member Author

@clue clue commented Aug 9, 2019

Updated to work around failing test on legacy PHP 5.3 due to partly closed socket resource :shipit:

Loading

composer.json Outdated Show resolved Hide resolved
Loading
The TcpTransportExecutor will now keep the TCP/IP socket connection to
the DNS server open for a short period. Additional queries can reuse the
same socket connection and pipeline multiple queries over this single
socket. This avoids creating multiple socket resources for concurrent
requests and implies the TCP/IP connection overhead only applies once
instead of for each query. Among others, this helps avoiding excessive
resources and significantly improves query performance when using
multiple (concurrent) queries.

This implements RFC 7766 as per https://tools.ietf.org/html/rfc7766
jsor
jsor approved these changes Aug 11, 2019
@clue clue requested a review from WyriHaximus Aug 11, 2019
@WyriHaximus WyriHaximus merged commit c94f002 into reactphp:master Aug 11, 2019
1 check passed
Loading
@clue clue deleted the tcp-reuse branch Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants