-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Multiple dns servers #6
Comments
@clue You think this would be hard to do? We could let two servers race and use the first answer. Refs: beyondcode/laravel-websockets#31 (comment) by @mpociot |
I agree, implementation-wise this wouldn't be too much work. Instead of concurrently sending a query to multiple DNS servers, there are a number of different strategies that are commonly used in practice, for instance:
See https://linux.die.net/man/5/resolver
The way I understand the referenced ticket, it looks like this might in fact be unrelated to this feature. On Mac you can use This ticket hasn't received much attention simply because it's not too common to have a setup that relies on this in practice. Having DNS fall back to secondary DNS servers incurs a significant delay for all DNS lookups, so you usually should ensure your primary DNS servers is reachable. In a failover scenario this might be useful as a backup, but even then there are multiple alternative solutions. For instance, on systemd-enabled systems your local DNS stub takes care of this and you only have to query this as your primary DNS server. As such, there are currently no immediate plans to build this from my end (no demand at the moment and more important outstanding issues currently), but I guess we would be really happy to accept PRs 👍 |
Might have a use case for it soon 😎 |
Currently this component only supports a single DNS server so with reactphp#6 in mind I started working on adding multiple server support. But ran into the issue that if the first server on the list isn't responding it takes a while before falling over the the next server in the list. So with my work on reactphp/socket#196 in mind and specifically the basic principle of https://tools.ietf.org/html/rfc8305#section-3.1 the work shifted to sending the queries out with a delay between them rather then waiting for the first server to fail/succeed. On the plus side records will resolve faster when a server in the list is failing. On the down side it will send more queries thus generating a bit more network traffic.
It would be nice if it was possible to add multiple dns servers
The text was updated successfully, but these errors were encountered: