From: Remi Gacogne Date: Thu, 19 Mar 2020 10:37:07 +0000 (+0100) Subject: dnsdist: Warn on startup about low weight values with chashed X-Git-Tag: dnsdist-1.5.0-alpha1~2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F8950%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Warn on startup about low weight values with chashed --- diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index 53637eb73f..45ab97ea30 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -2193,6 +2193,10 @@ try // pre compute hashes auto backends = g_dstates.getLocal(); for (auto& backend: *backends) { + if (backend->weight < 100) { + vinfolog("Warning, the backend '%s' has a very low weight (%d), which will not yield a good distribution of queries with the 'chashed' policy. Please consider raising it to at least '100'.", backend->getName(), backend->weight); + } + backend->hash(); } }