]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Warn on startup about low weight values with chashed 8950/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 19 Mar 2020 10:37:07 +0000 (11:37 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 19 Mar 2020 10:37:07 +0000 (11:37 +0100)
pdns/dnsdist.cc

index 53637eb73f9b18fb324c45e50cf15fd2cf672f93..45ab97ea30f5902ee2b78afa07e3df8bd9ef787b 100644 (file)
@@ -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();
       }
     }