Repository navigation
Multiple dns servers #6
Description
Activity
@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
@WyriHaximus: @clue You think this would be hard to do? We could let two servers race and use the first answer.
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:
The algorithm used is to try a name server, and if the query times out, try the next, until out of name servers, then repeat trying all the name servers until a maximum number of retries are made.
[…]
rotatesets RES_ROTATE in _res.options, which causes round-robin selection of nameservers from among those listed. This has the effect of spreading the query load among all listed servers, rather than having all clients try the first listed server first every time.
See https://linux.die.net/man/5/resolver
@WyriHaximus: Refs: beyondcode/laravel-websockets#31 (comment) by @mpociot
The way I understand the referenced ticket, it looks like this might in fact be unrelated to this feature. On Mac you can use
/etc/resolver/*files to set up different DNS settings/nameservers for certain domains (http://www.manpagez.com/man/5/resolver/). I'm not aware of any similar mechanism on other platforms (check man page above). This appears to be commonly used for "development domains" and/or split-horizon DNS setups. On other platforms, this is often handled by having a (local) DNS resolver (stub) taking care of this configuration.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 👍
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 +1
Might have a use case for it soon 😎
It would be nice if it was possible to add multiple dns servers