]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Speed up the consistent hashing policies with large weights
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 22 Jan 2020 17:59:40 +0000 (18:59 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 11 Feb 2020 10:49:58 +0000 (11:49 +0100)
commit50033a8e00c840cd5a43ded5add58965e9e15929
tree44044cdcb6ab5966248c8990a78b904478814312
parenta291bc0dfaeae9f1d42672383cb64d739619c858
dnsdist: Speed up the consistent hashing policies with large weights

Using a sorted vector provides a much faster lookup time than a
std::set when the number of points on the circle (weight of the
backend) is huge.
A boost::flat_set is almost as fast as a sorted vector but the
insertion time is quite bad.
pdns/dnsdist.hh
pdns/dnsdistdist/dnsdist-backend.cc
pdns/dnsdistdist/dnsdist-lbpolicies.cc