AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home.html
GNU General Public License v3.0
25.42k stars 1.83k forks source link

Downgraded to v0.107.41 & odd load-balancing behaviour #6480

Closed gyCfjSnO closed 10 months ago

gyCfjSnO commented 11 months ago

Prerequisites

Platform (OS and CPU architecture)

Custom (please mention in the description)

Installation

GitHub releases or script from README

Setup

On one machine

AdGuard Home version

v0.107.41

Action

I've noticed in v0.107.41 that load-balancing was enabled by default in DNS settings.

However, despite having six DNS upstream servers set only one server was shown in the logs as being queried on the Dashboard under Top upstreams & Average upstream response time.

Since setting it to Parallel requests in DNS settings all of the six provided DNS upstream servers are being queried. The one server initially only showing was the slowest.

Expected result

Have all of the provided DNS upstream servers queried when load-balancing option is selected in DNS settings

Actual result

Only one DNS upstream server was ever queried while the load-balancing option was selected.

Additional information and/or screenshots

Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-1043-raspi aarch64)

ubuntu@ubuntu:~$ sudo systemctl status AdGuardHome
● AdGuardHome.service - AdGuard Home: Network-level blocker
     Loaded: loaded (/etc/systemd/system/AdGuardHome.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2023-11-27 19:58:07 AEST; 2 days ago
    Process: 4108 ExecStartPre=/bin/mkdir -p /var/log/ (code=exited, status=0/SUCCESS)
   Main PID: 4109 (AdGuardHome)
      Tasks: 10 (limit: 4423)
     Memory: 150.6M
        CPU: 7min 54.649s
     CGroup: /system.slice/AdGuardHome.service
             └─4109 /opt/AdGuardHome/AdGuardHome -s run

Nov 27 19:58:07 ubuntu systemd[1]: Starting AdGuard Home: Network-level blocker...
Nov 27 19:58:07 ubuntu systemd[1]: Started AdGuard Home: Network-level blocker.
http:
  pprof:
    port: 6060
    enabled: false
  address: 192.168.0.2:80
  session_ttl: 720h
users:
  - name: xxxxx
    password: xxxxx
auth_attempts: 5
block_auth_min: 15
http_proxy: ""
language: ""
theme: auto
dns:
  bind_hosts:
    - 192.168.0.2
  port: 53
  anonymize_client_ip: false
  ratelimit: 0
  ratelimit_subnet_len_ipv4: 24
  ratelimit_subnet_len_ipv6: 56
  ratelimit_whitelist: []
  refuse_any: true
  upstream_dns:
    - tls://unfiltered.adguard-dns.com
    - https://unfiltered.adguard-dns.com/dns-query
    - tls://sandbox.opendns.com
    - https://sandbox.opendns.com/dns-query
    - tls://one.one.one.one
    - https://cloudflare-dns.com/dns-query
  upstream_dns_file: ""
  bootstrap_dns:
    - 94.140.14.140
    - 94.140.14.141
    - 208.67.222.2
    - 208.67.220.2
    - 1.1.1.1
    - 1.0.0.1
  fallback_dns: []
  all_servers: true
  fastest_addr: false
  fastest_timeout: 1s
  allowed_clients: []
  disallowed_clients: []
  blocked_hosts:
    - version.bind
    - id.server
    - hostname.bind
  trusted_proxies:
    - 127.0.0.0/8
    - ::1/128
  cache_size: 0
  cache_ttl_min: 0
  cache_ttl_max: 0
  cache_optimistic: false
  bogus_nxdomain: []
  aaaa_disabled: false
  enable_dnssec: true
  edns_client_subnet:
    custom_ip: ""
    enabled: true
    use_custom: false
  max_goroutines: 300
  handle_ddr: true
  ipset: []
  ipset_file: ""
  bootstrap_prefer_ipv6: false
  upstream_timeout: 10s
  private_networks: []
  use_private_ptr_resolvers: true
  local_ptr_upstreams: []
  use_dns64: false
  dns64_prefixes: []
  serve_http3: false
  use_http3_upstreams: false
tls:
  enabled: false
  server_name: ""
  force_https: false
  port_https: 443
  port_dns_over_tls: 853
  port_dns_over_quic: 853
  port_dnscrypt: 0
  dnscrypt_config_file: ""
  allow_unencrypted_doh: false
  certificate_chain: ""
  private_key: ""
  certificate_path: ""
  private_key_path: ""
  strict_sni_check: false
querylog:
  ignored: []
  interval: 2160h
  size_memory: 1000
  enabled: true
  file_enabled: true
statistics:
  ignored: []
  interval: 24h
  enabled: true
filters:
  - enabled: true
    url: https://adguardteam.github.io/HostlistsRegistry/assets/filter_34.txt
    name: HaGeZi Multi NORMAL
    id: 1701079087
whitelist_filters:
  - enabled: true
    url: https://adguardteam.github.io/HostlistsRegistry/assets/filter_45.txt
    name: HaGeZi's Allowlist Referral
    id: 1701079090
user_rules: []
dhcp:
  enabled: false
  interface_name: ""
  local_domain_name: lan
  dhcpv4:
    gateway_ip: ""
    subnet_mask: ""
    range_start: ""
    range_end: ""
    lease_duration: 86400
    icmp_timeout_msec: 1000
    options: []
  dhcpv6:
    range_start: ""
    lease_duration: 86400
    ra_slaac_only: false
    ra_allow_slaac: false
filtering:
  blocking_ipv4: ""
  blocking_ipv6: ""
  blocked_services:
    schedule:
      time_zone: Local
    ids: []
  protection_disabled_until: null
  safe_search:
    enabled: false
    bing: true
    duckduckgo: true
    google: true
    pixabay: true
    yandex: true
    youtube: true
  blocking_mode: refused
  parental_block_host: family-block.dns.adguard.com
  safebrowsing_block_host: standard-block.dns.adguard.com
  rewrites: []
  safebrowsing_cache_size: 1048576
  safesearch_cache_size: 1048576
  parental_cache_size: 1048576
  cache_time: 30
  filters_update_interval: 24
  blocked_response_ttl: 10
  filtering_enabled: true
  parental_enabled: false
  safebrowsing_enabled: false
  protection_enabled: true
clients:
  runtime_sources:
    whois: true
    arp: true
    rdns: true
    dhcp: true
    hosts: true
  persistent:
    - safe_search:
        enabled: false
        bing: true
        duckduckgo: true
        google: true
        pixabay: true
        yandex: true
        youtube: true
      blocked_services:
        schedule:
          time_zone: Local
        ids: []
      name: RIPE Atlas Probe
      ids:
        - 192.168.0.4
      tags: []
      upstreams: []
      use_global_settings: false
      filtering_enabled: false
      parental_enabled: false
      safebrowsing_enabled: false
      use_global_blocked_services: true
      ignore_querylog: false
      ignore_statistics: false
    - safe_search:
        enabled: false
        bing: true
        duckduckgo: true
        google: true
        pixabay: true
        yandex: true
        youtube: true
      blocked_services:
        schedule:
          time_zone: Local
        ids: []
      name: SamKnows
      ids:
        - 192.168.0.3
      tags: []
      upstreams: []
      use_global_settings: false
      filtering_enabled: false
      parental_enabled: false
      safebrowsing_enabled: false
      use_global_blocked_services: true
      ignore_querylog: false
      ignore_statistics: false
    - safe_search:
        enabled: false
        bing: true
        duckduckgo: true
        google: true
        pixabay: true
        yandex: true
        youtube: true
      blocked_services:
        schedule:
          time_zone: Local
        ids: []
      name: Work
      ids:
        - 192.168.0.9
      tags: []
      upstreams: []
      use_global_settings: false
      filtering_enabled: false
      parental_enabled: false
      safebrowsing_enabled: false
      use_global_blocked_services: true
      ignore_querylog: false
      ignore_statistics: false
log:
  file: ""
  max_backups: 0
  max_size: 100
  max_age: 3
  compress: false
  local_time: false
  verbose: false
os:
  group: ""
  user: ""
  rlimit_nofile: 0
schema_version: 27

A screenshot of the statistics after changing the DNS setting to parallel requests. Previously only https://unfiltered.adguard-dns.com:443/dns-query was showing when the DNS setting was set to load-balancing.

image
odcold commented 11 months ago

can confirm this behavior in latest edge v0.108.0-a.785+214175eb

EugeneOne1 commented 10 months ago

@gyCfjSnO, @odcold, hello and apologies for late response. We've redesigned the load balancing algorithm pushed it within the version v0.108.0-a.806+ad147ac7 to the edge update channel. It should now select each server with a probability proportional to its RTT, and thus choose the slower servers a little more often. Could you please try it and report back your observations?

gyCfjSnO commented 10 months ago

@gyCfjSnO, @odcold, hello and apologies for late response. We've redesigned the load balancing algorithm pushed it within the version v0.108.0-a.806+ad147ac7 to the edge update channel. It should now select each server with a probability proportional to its RTT, and thus choose the slower servers a little more often. Could you please try it and report back your observations?

I'm not using edge or beta so I'm unable to test for you sorry.

odcold commented 10 months ago

@gyCfjSnO, @odcold, hello and apologies for late response. We've redesigned the load balancing algorithm pushed it within the version v0.108.0-a.806+ad147ac7 to the edge update channel. It should now select each server with a probability proportional to its RTT, and thus choose the slower servers a little more often. Could you please try it and report back your observations?

@EugeneOne1 As far as i can see rn - every server was used after ~ 1000 queries and fastest are used more often. So i guess everything is working as expected

EugeneOne1 commented 10 months ago

@odcold, your help is appreciated. We're closing this issue for now and will include this change in the upcoming release.