]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Refactor load-balancing policies
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 21 Jul 2025 15:04:40 +0000 (17:04 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 6 Oct 2025 14:50:24 +0000 (16:50 +0200)
commit2f654e35a979e018975f59d3e5a2db00fc9a150f
tree850ee4ac91bbca573d054cf0237bbe7f2e247f5f
parent57d3a845d3ba404e98b81e112824d126905a3eee
dnsdist: Refactor load-balancing policies

Since we no longer need to increase the reference counter of the
returned backend (the runtime configuration cannot be updated be
updated under our feet anymore), we can return the position of the
selected backend in the initial array instead, significantly
reducing the performance cost of the load-balancing policies.

Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
pdns/dnsdistdist/Makefile.am
pdns/dnsdistdist/dnsdist-lbpolicies.cc
pdns/dnsdistdist/dnsdist-lbpolicies.hh
pdns/dnsdistdist/dnsdist-lua-ffi.cc
pdns/dnsdistdist/dnsdist.cc
pdns/dnsdistdist/test-dnsdistlbpolicies_cc.cc
regression-tests.dnsdist/test_Routing.py