Skip to content

DNS Failover mode does not failover #4514

Closed

Description

@pushkar2017

Background:
ATS can be configured to use the DNS nameservers in RR mode or Failover mode using the config parameter: CONFIG proxy.config.dns.round_robin_nameservers
When CONFIG proxy.config.dns.round_robin_nameservers INT 0 the nameservers are used in failover mode. I.e. ATS will try to use the first/primary resolver in /etc/resolv.conf.
Issue:
If the primary nameserver doesn't respond, ATS is supposed to fallback to the next nameserver in the list but it doesn't do that because the code to detect failure is in DNSHandler::mainEvent. This method is only invoked when responses are received.. So it turns out to be a chicken and egg problem.

Activity

  1. added a commit that references this issue on Oct 30, 2018
  2. self-assigned this
    on May 30, 2019
  3. added this to the 10.0.0 milestone on May 30, 2019
  4. github-actions commented on Oct 27, 2021

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. Marking it stale to flag it for further consideration by the community.

  5. bryancall commented on Jun 28, 2026

    @bryancall
    Contributor

    DNS nameserver failover was fixed in 2022 by #8847, which changed DNSHandler::mainEvent from response-driven one-shot scheduling to a periodic timer (schedule_every), so a dead primary is now detected and failed over even when it never responds (the chicken-and-egg the report described). A gold test (dns_down_nameserver.test.py) covers the down-then-recover case. The fix first shipped in the 9.2.0 release and is in the current 10.1.2 release. Closing as fixed.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions