From 755be99fa947552612787a75e12670f8145b7ac5 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Thu, 19 Mar 2020 11:37:07 +0100 Subject: [PATCH] dnsdist: Warn on startup about low weight values with chashed --- pdns/dnsdist.cc | 4 ++++ 1 file changed, 4 insertions(+) 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(); } } -- 2.47.2