8000 Add new `FallbackExecutor` and update DNS `Factory` to use fallback DNS servers when DNS `Config` lists multiple servers by clue · Pull Request #180 · reactphp/dns · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add new FallbackExecutor and update DNS Factory to use fallback DNS servers when DNS Config lists multiple servers #180

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 &ldq 8000 uo;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

Merged
merged 5 commits into from
Jun 25, 2021

Conversation

clue
Copy link
Member
@clue clue commented Jun 24, 2021

This changeset adds a new FallbackExecutor and subsequently updates the DNS Factory to use fallback DNS servers when DNS Config lists multiple servers.

Previous versions would only use the first DNS server listed in the DNS Config. With these changes applied, it will take up to three DNS servers from this list. This is artificially limited to match default limits in place in most systems (see MAXNS config). Internally, it will implement the same strategy that is used in most systems: Always query the first DNS server and if this fails (or times out), use the second DNS server and so on. See also man resolv.conf for details.

Most systems (citation needed) use only a single DNS server and would not be affected by this change. A reasonable number of systems (citation needed) use multiple DNS servers as a fallback just in case and have a functioning primary DNS server and would not be affected by this change. A very small number of systems would use multiple DNS servers and have broken connectivity with their primary DNS server, these systems can now resolve DNS queries, albeit with a noticeable delay.

Accordingly, this is a pure future addition that works across all supported platforms and does not affect BC.

Builds on top of #179
Resolves / closes #6
Supersedes / closes #131

@clue clue added this to the v1.7.0 milestone Jun 24, 2021
Copy link
Member
@WyriHaximus WyriHaximus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor things

@clue clue force-pushed the fallback-servers branch from 4dcac78 to 84d0c5f Compare June 24, 2021 17:37
@WyriHaximus WyriHaximus merged commit 1eb04e0 into reactphp:master Jun 25, 2021
@clue clue deleted the fallback-servers branch June 25, 2021 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple dns servers
2 participants
0