June 2, 2021 10:28 AM, "Daniel Stirnimann via dnsdist" <dnsdist@mailman.powerdns.com> wrote:
> Hello Tom, > > This might come very close to what you are looking for: > > newServer({name="backend01",order=1, qps=5000,...}) > newServer({name="backend02",order=1, qps=5000,...}) > newServer({name="backend03",order=2, qps=5000,...}) > newServer({name="backend04",order=2, qps=5000,...}) > > setServerPolicy(firstAvailable) > > "The firstAvailable policy, picks the first available server that has > not exceeded its QPS limit, ordered by increasing ‘order’. If all > servers are above their QPS limit, a server is selected based on the > leastOutstanding policy. For now this is the only policy using the QPS > limit." > https://dnsdist.org/guides/serverselection.html Yes that does the trick. https://dnsdist.org/reference/config.html#Server.order https://dnsdist.org/reference/config.html?highlight=order#newServer Since i was already writing along the same lines, here is part of an actual configuration of mine: -- define the good servers newServer{address="127.0.0.1:5353", qps=300, order=1} newServer{address="8.8.8.8", qps=2, order=2} newServer{address="8.8.4.4", qps=2, order=2} newServer{address="208.67.222.222", qps=1, order=2} newServer{address="208.67.220.220", qps=1, order=2} newServer{address="2001:4860:4860::8888", qps=2, order=2} newServer{address="2001:4860:4860::8844", qps=2, order=2} newServer{address="2620:0:ccc::2", qps=10, order=2} newServer{address="2620:0:ccd::2", qps=10, order=2} > showServers() # Name Address State Qps Qlim Ord Wt Queries Drops Drate Lat Outstanding Pools 0 127.0.0.1:5353 127.0.0.1:5353 up 1.0 300 1 1 435275 1304 0.0 159.3 0 1 8.8.8.8:53 8.8.8.8:53 up 0.0 2 2 1 0 0 0.0 0.0 0 2 8.8.4.4:53 8.8.4.4:53 up 0.0 2 2 1 0 0 0.0 0.0 0 3 208.67.222.222:53 208.67.222.222:53 up 0.0 1 2 1 0 0 0.0 0.0 0 4 208.67.220.220:53 208.67.220.220:53 up 0.0 1 2 1 0 0 0.0 0.0 0 5 [2001:4860:4860::888 [2001:4860:4860::8888]:53 up 0.0 2 2 1 0 0 0.0 0.0 0 6 [2001:4860:4860::884 [2001:4860:4860::8844]:53 up 0.0 2 2 1 0 0 0.0 0.0 0 7 [2620:0:ccc::2]:53 [2620:0:ccc::2]:53 up 0.0 10 2 1 0 0 0.0 0.0 0 8 [2620:0:ccd::2]:53 [2620:0:ccd::2]:53 up 0.0 10 2 1 0 0 0.0 0.0 0 All 0.0 435275 1304 Stefan _______________________________________________ dnsdist mailing list dnsdist@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/dnsdist