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

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 the new feature label Aug 9, 2019

@clue clue added this to the v1.2.0 milestone Aug 9, 2019

@clue clue force-pushed the clue-labs:tcp-reuse branch from 6db0bac to c8082b6 Aug 9, 2019

@clue

This comment has been minimized.

Copy link
Member Author

commented Aug 9, 2019

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

composer.json Outdated Show resolved Hide resolved
Reuse TCP/IP socket connection and pipeline outgoing queries
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

@clue clue force-pushed the clue-labs:tcp-reuse branch from c8082b6 to 44a8c92 Aug 11, 2019

@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

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@clue clue deleted the clue-labs: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
3 participants
You can’t perform that action at this time.