]> git.ipfire.org Git - thirdparty/pdns.git/commit - pdns/dnsdist.hh
dnsdist: Use a separate lock for accessing the pool's servers 6381/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 23 Mar 2018 22:13:52 +0000 (23:13 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 23 Mar 2018 22:13:52 +0000 (23:13 +0100)
commita1b1a29ddbdc8d104d02564d023ba53015fa7861
treeee4479881f038c395fe608be9a50ecd9f4ad127a
parentc298c4d3f81a83444f26ea55c8ba12d0c8ce6693
dnsdist: Use a separate lock for accessing the pool's servers

We used to hold the Lua lock while applying the load-balancing policy
to select a backend, which is only needed by Lua policies, not core
ones. We do need a lock to make sure that the vector of servers is
not altered under our feet, but a per-pool read-write lock is enough
and reduces contention a lot, especially when the maintenance thread
is doing some heavy-lifting.
pdns/dnsdist-carbon.cc
pdns/dnsdist-lua-bindings.cc
pdns/dnsdist-lua.cc
pdns/dnsdist-tcp.cc
pdns/dnsdist-web.cc
pdns/dnsdist.cc
pdns/dnsdist.hh