New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Round robin DNS entries are not being rotated. #5049
Comments
Hi there! Are you still experiencing this? |
Yes still the case with v0.107.46 - It has something to do with the way the cache is handled. If I disable the cache I get the expected behaviour. |
@hhaniel, I feel there is a bit misunderstanding on what upstream mode "Load-balancing" does. The actual feature is about rotating the upstream servers used to resolve client's requests and not the upstream server's self addresses. Currently, the first successfully connected upstream's address is used, and cache has nothing to do with this. Could you please collect a verbose log for us? We'll file a separate issue if this unintended rotation will be confirmed. However, considering this is a feature request. |
Let me try to explain it in a way that can be reprroduced anywhere: |
@hhaniel, I see. According to the Cloudflare's article about round-robin DNS, this functionality is intended to be implemented on the side of an authoritative nameserver, not on the side of the forwarding resolver. It also mentions the drawbacks of caching the responses. AFAIK, there are no DNS standards that require this technique to be implemented on the resolver side, so we'd still consider this a feature request. |
OK - well maybe it is not a standard but there is a RFC for it as well and most DNS forwarders respect round robin and handle it accordingly - certainly bind and dnsmasq do so a workaround for me is that I have put dnsmasq in front of AdGuard to do the in my view right thing. I would ask you to please consider it as a feature request though. |
Prerequisites
I have checked the Wiki and Discussions and found no answer
I have searched other issues and found no duplicates
I want to report a bug and not ask a question
Operating system type
Linux, Other (please mention the version in the description)
CPU architecture
x86
Installation
Docker
Setup
On one machine
AdGuard Home version
v0.107.12
Description
What did you do?
Round robin DNS name setup on upstream DNS server - eg DNS name points to 3 IP addresses.
Expected result
On every DNS query the IP address should get rotated and that happens on the upstream server running bind or for a DNS entry such as 0.pool.ntp.org
Actual result
AdGuard Home will return IP addresses in the same order on each query so no rotation or load balancing is taking place
Two queries against a standard bind DNS server for round robin:
Server: ns1
Address: 192.168.0.1#53
Name: time.localnet.lan
Address: 192.168.0.20
Name: time.localnet.lan
Address: 192.168.0.1
Name: time.localnet.lan
Address: 192.168.0.19
Server: ns1
Address: 192.168.0.1#53
Name: time.localnet.lan
Address: 192.168.0.19
Name: time.localnet.lan
Address: 192.168.0.20
Name: time.localnet.lan
Address: 192.168.0.1
Same two queries against AdGuard Home for round robin:
Server: ns0
Address: 192.168.0.216#53
Non-authoritative answer:
Name: time.localnet.lan
Address: 192.168.0.1
Name: time.localnet.lan
Address: 192.168.0.19
Name: time.localnet.lan
Address: 192.168.0.20
Server: ns0
Address: 192.168.0.216#53
Non-authoritative answer:
Name: time.localnet.lan
Address: 192.168.0.1
Name: time.localnet.lan
Address: 192.168.0.19
Name: time.localnet.lan
Address: 192.168.0.20
The text was updated successfully, but these errors were encountered: