Feature Request: Enhancements for Forward and Recursive Modes #34
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi! I would like to propose several enhancements to improve flexibility and observability in both forward and recursive modes:
Support
ip:portin forward modeAllow specifying upstream servers with custom ports. Example:
Fallback mechanism in forward mode
Introduce a fallback configuration for upstream resolvers when primary servers fail:
Upstream status visibility via API
Extend the API to expose:
Domain prefetch support
Add a
prefetch-domainfeature to proactively resolve and cache specific domains.Bind source IP for recursive queries
In recursive mode, allow binding a specific local IP address for outbound queries.
Thanks for the detailed request @Palvef!
Items 1, 2, 3 are addressed in #77:
addressnow accepts a string or array with optional per-server port ("1.2.3.4:5353","[::1]:5553")fallbackpool, tried only when all primaries fail/statsexposes the preferred upstream and pool infoItem 4 is addressed in #78 — cache warming:
Resolves A + AAAA at startup, then re-resolves proactively before TTL expiry so configured domains are always one hop away.
Item 5 (bind source IP for recursive) — this is handled at the OS level via routing tables. The kernel selects the source IP based on the destination route; if you need to pin DNS traffic to a specific interface, the right place is
ip route/ firewall rules, not the application. Out of scope unless a concrete use case surfaces.In multi-ISP environments, relying solely on the kernel routing table is insufficient for DNS recursion optimization.
A common deployment scenario involves a single host with multiple NUMA nodes, each bound to a different ISP uplink and IP address. In this setup, each
NUMAinstance is expected to perform recursive resolution through its associated ISP path to obtain topology-aware CDN responses.For example:
Resolvers such as
unboundsupport explicit outgoing interface binding, ensuring that recursive queries egress via the intended ISP. This directly impacts CDN resolution quality, as many providers return location-sensitive IPs based on the source address of the query.Currently, numa follows the system default route, which results in all recursive traffic potentially exiting through a single ISP. In multi-ISP scenarios, this can lead to suboptimal CDN endpoints being returned, degrading performance.
Therefore, binding the source IP (or interface) at the application level is not just a routing concern but a functional requirement for accurate DNS resolution in these environments.
Ok understood let me track with #93 thanks again!