DNS load balancing



  • Hello,

    I don't know if I'm on the right forum section, I didn't find the section for the load-balancing.

    I have a pool of public DNS and private DNS on a docker swarm. Public dns are listening on two ip adresses on  udp/tcp 530 port, private are listening on te port 531.

    To load balance and change the Dns port to 53 I plan to use the load-balancer functionality.

    But once implemented it doesn't work and I don't know how to troubleshoot the problem

    Some screenshots


    And the relyd.conf

    
    log updates 
    timeout 1000 
    table <mysqld>{
    	10.31.1.10 retry 5
    	10.31.1.40 retry 5
    }
    table <public-dns>{
    	10.33.1.10
    	10.33.1.20
    }
    dns protocol "dnsproto" {
    	tcp { nodelay, sack, socket buffer 1024, backlog 1000 }
    }
    redirect "mysqlserver" {
      listen on 10.31.1.100 port 3306
      forward to <mysqld>port 3306 check tcp 
    }
    relay "pubdns" {
      listen on 10.33.1.100 port 53
      protocol "dnsproto"
      forward to <public-dns>port 530 mode loadbalance check icmp 
    }</public-dns></mysqld></public-dns></mysqld> 
    

    Thank you for the help


  • Rebel Alliance Developer Netgate

    The DNS load balancing feature doesn't see much testing, it's possible there is an issue there, or it may just be a limit of relayd. Last time I tried it, it worked, but I also wasn't trying to have it hit a different internal port.

    How are you testing it to see if it works? Have you tried other monitoring types than ICMP?

    One major thing to be aware of, when relayd does dns balancing it acts like a proxy, so your DNS servers will only see the address of the firewall itself and not the clients. Depending on your DNS server config that may make a difference in how it handles the queries.