[Feature Request] Fallback to subsequent upstream responses on NXDOMAIN / SERVFAIL / empty answer in parallel queries mode
Prerequisites
-
[x] I have checked the Wiki and Discussions and found no answer
-
[x] I have searched other issues and found no duplicates
-
[x] I want to request a feature or enhancement and not ask a question
The problem
When using the "Parallel queries" (all_servers) upstream mode, AdGuard Home immediately returns the fastest response to the client.
However, in many real-world network setups (such as mixed upstream lists containing local/ISP DNS and public/encrypted DNS, or ISPs returning hijacked/empty responses):
- The fastest upstream server might return
NXDOMAIN,SERVFAIL,REFUSED, orNOERRORwith an empty answer section (NODATA). - A slightly slower upstream server in the same parallel batch might have a valid, working
A/AAAArecord.
Because AGH strictly picks the first response that arrives, the client receives a failure/empty response, causing domain resolution to fail even though a valid answer was received just milliseconds later from another upstream.
Proposed solution
Implement a configurable "Smart Fallback" (or "Prefer Positive Resolution") option for parallel upstream queries:
- When parallel queries are sent, if the fastest response is negative or an error (
NXDOMAIN,SERVFAIL,NODATA, or network error), AGH should not immediately return it to the client. - Instead, AGH should keep waiting (within the configured upstream timeout window) for responses from the remaining parallel upstreams.
- If any subsequent upstream returns a valid positive answer (with valid resource records), AGH returns that answer to the client and caches it.
- If all upstream servers return an error/negative response, or if the timeout expires, AGH then returns the negative response to the client.
- Fastest IP mode / Load balancing: Does not solve the issue when different upstreams have different zone views, selective blocking, or intermittent failures.
- Specific domain routing (
[/domain/]upstream): Requires maintaining large static lists manually instead of relying on automated resolution across upstreams.
Alternatives considered and additional information
This feature would significantly improve reliability when using diverse upstream providers (e.g., combining low-latency local resolvers with privacy/unfiltered fallback resolvers).
Hello, thank you for suggesting a new feature, but this is a duplicate of issue #6508. You can vote for this feature in issue #6508. Your message also describes the problem and the proposed solution in more detail. Please add your comment with this information to issue #6508 :) I am closing this issue as a duplicate.