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

[Client] Connector should use a caching DNS resolver by default #115

Closed
kelunik opened this issue Sep 11, 2017 · 1 comment · Fixed by #226
Closed

[Client] Connector should use a caching DNS resolver by default #115

kelunik opened this issue Sep 11, 2017 · 1 comment · Fixed by #226

Comments

@kelunik
Copy link
Contributor

kelunik commented Sep 11, 2017

Doing multiple DNS queries per request might be pretty expensive, depending where the next caching DNS resolver is that the resolver talks to, which might be 8.8.8.8. Multiple queries, because A and AAAA usually have to be queries for domains.

@clue clue changed the title Connector should use a caching DNS resolver by default [Client] Connector should use a caching DNS resolver by default Sep 12, 2017
@clue
Copy link
Member

clue commented Sep 12, 2017

Thanks for filing this ticket, I think you're raising a very good issue here 👍

It's a very common setup to connect to the same host over and over again, so I agree that it makes perfect sense to keep a small cache of recent DNS records in memory. However, the default cached resolver does currently not limit the number of cache entries, which is why I've just created reactphp/dns#82 which would need to be implemented first.

(Note that this is not really related to IPv6 addresses (AAAA records), I've just created #116 to keep track of this.)

PRs would be much appreciated! :shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants