Skip to content

Multiple dns servers #6

Description

@cdekok

It would be nice if it was possible to add multiple dns servers

Activity

  1. WyriHaximus commented on Dec 10, 2018

    @WyriHaximus
    Member

    @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

  2. clue commented on Jan 29, 2019

    @clue
    Member

    @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.
    […]
    rotate

    sets 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 👍

  3. WyriHaximus commented on Jan 29, 2019

    @WyriHaximus
    Member

    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 😎

  4. added a commit that references this issue on Jul 23, 2019
  5. added this to the v1.3.0 milestone on Aug 14, 2019
  6. removed this from the v1.3.0 milestone on Jul 10, 2020
  7. added this to the v1.7.0 milestone on Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions