[dnsdist] Packetcache expiring

nocturo nocturo at gmail.com
Thu Mar 8 17:41:02 UTC 2018


Sent message too early. To recap, I would assume the config to leave things
in cache for up to 86400 seconds but looks like cache get expunged after
those two minutes:
Entries: 2/100000
Hits: 0
Misses: 2

after two minutes:
Entries: 0/100000
Hits: 31
Misses: 17

I don't know where that time would come from and quickly searching trough
source doesn't seem to indicate any such value. (120)

Thank you!
Nick

On Thu, Mar 8, 2018 at 6:37 PM, Nemanja Zeljkovic <nocturo at gmail.com> wrote:

> Hi,
>
> I have a problem with packet cache when trying to use it in case of all
> servers are down. Namely, I’ve tried setting it up to cache entries for up
> to a day in case of a problem but it always expires after 2 minutes.
>
> I’m using following config:
> newServer({address="127.0.0.1:54", name="local", qps=1000})
> setServerPolicy(firstAvailable) -- first server within its QPS limit
> controlSocket('127.0.0.1:5199')
> addLocal('0.0.0.0:53', { doTCP=true, reusePort=true })
> setKey(“xyz")
> webserver(“xyz")
> pc = newPacketCache(100000, 86400, 1, 86400, 86400, true)
> getPool(""):setCache(pc)
> setStaleCacheEntriesTTL(3600)
> addACL("0.0.0.0/0”)
>
> start up dnsdist, run a query, getServer(0):setDown() and keep doing dig
> and it starts failing after two minutes with:
> ; <<>> DiG 9.10.3-P4-Ubuntu <<>> example.com @127.0.0.1 -p 53
> ;; global options: +cmd
> ;; connection timed out; no servers could be reached
>
> In my understanding of the packet cache, it would cache for up to 86400 if
> the cache is expired, but it looks like cache gets expunged since doing
> stats on the cache:
> Running:
> dnsdist 1.2.1 (Lua 5.1.4)
> Enabled features: dnscrypt libsodium protobuf re2 systemd
>
> on Ubuntu 16.04.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/dnsdist/attachments/20180308/49d08d63/attachment.html>


More information about the dnsdist mailing list