]> granicus.if.org Git - pdns/commitdiff
Merge pull request #4748 from rgacogne/dnsdist-cache-cleaning-percentage dnsdist-1.1.0-beta2
authorRemi Gacogne <rgacogne@users.noreply.github.com>
Wed, 14 Dec 2016 11:00:33 +0000 (12:00 +0100)
committerGitHub <noreply@github.com>
Wed, 14 Dec 2016 11:00:33 +0000 (12:00 +0100)
dnsdist: Add `setCacheCleaningPercentage()`

1  2 
pdns/README-dnsdist.md
pdns/dnsdist-lua.cc
pdns/dnsdist.cc
pdns/dnsdist.hh

index b9521c2984eeda6f184f936f80906b3bf2fe040d,44cc1ed3b93bcc9a1cdc24de310a277646836988..263914d37d17ba2c199935836fb8294567220c36
@@@ -1491,10 -1488,8 +1491,11 @@@ instantiate a server with additional pa
      * `setMaxTCPQueuedConnections(n)`: set the maximum number of TCP connections queued (waiting to be picked up by a client thread), defaults to 1000. 0 means unlimited
      * `setMaxUDPOutstanding(n)`: set the maximum number of outstanding UDP queries to a given backend server. This can only be set at configuration time and defaults to 10240
      * `setCacheCleaningDelay(n)`: set the interval in seconds between two runs of the cache cleaning algorithm, removing expired entries
+     * `setCacheCleaningPercentage(n)`: set the percentage of the cache that the cache cleaning algorithm will try to free by removing expired entries. By default (100), all expired entries are removed
      * `setStaleCacheEntriesTTL(n)`: allows using cache entries expired for at most `n` seconds when no backend available to answer for a query
 +    * `setTCPRecvTimeout(n)`: set the read timeout on TCP connections from the client, in seconds
 +    * `setTCPSendTimeout(n)`: set the write timeout on TCP connections from the client, in seconds
 +    * `setUDPTimeout(n)`: set the maximum time dnsdist will wait for a response from a backend over UDP, in seconds. Defaults to 2
   * DNSCrypt related:
      * `addDNSCryptBind("127.0.0.1:8443", "provider name", "/path/to/resolver.cert", "/path/to/resolver.key", [false], [TCP Fast Open queue size]):` listen to incoming DNSCrypt queries on 127.0.0.1 port 8443, with a provider name of "provider name", using a resolver certificate and associated key stored respectively in the `resolver.cert` and `resolver.key` files. The fifth optional parameter sets SO_REUSEPORT when available. The last parameter sets the TCP Fast Open queue size, enabling TCP Fast Open when available and the value is larger than 0.
      * `generateDNSCryptProviderKeys("/path/to/providerPublic.key", "/path/to/providerPrivate.key"):` generate a new provider keypair
Simple merge
diff --cc pdns/dnsdist.cc
Simple merge
diff --cc pdns/dnsdist.hh
index 2390bcdafb66e80784f1820b29db1e4a48a7c13a,62089e1ac4cd1e2a3ea46bb588db42a9851a1260..cab656521a9da762586c7046b527022887172253
@@@ -612,11 -687,9 +612,12 @@@ extern std::atomic<bool> g_configuratio
  extern uint64_t g_maxTCPClientThreads;
  extern uint64_t g_maxTCPQueuedConnections;
  extern std::atomic<uint16_t> g_cacheCleaningDelay;
+ extern std::atomic<uint16_t> g_cacheCleaningPercentage;
  extern bool g_verboseHealthChecks;
  extern uint32_t g_staleCacheEntriesTTL;
 +extern bool g_apiReadWrite;
 +extern std::string g_apiConfigDirectory;
 +extern bool g_servFailOnNoPolicy;
  
  struct ConsoleKeyword {
    std::string name;