[dnsdist] Unexpected not-caching behavior in 1.5.0-rc3

Phillip R. Jaenke prj at rootwyrm.com
Wed Jul 1 16:57:50 UTC 2020


To test/evaluate performance, one of the tests I run is basically "look
up a consistent group of records I know exist, then do it a couple
hundred more times or so." Some from the local authoritative, some from
the Internet at large. The corresponding dnsdist configuration looks
like this:

--begin config--
-- dnsdist 1.5.0-rc3
-- set QPS to tested performance (>250kQPS/inst) to prevent surprises.
newServer( {address="10.53.0.100:53", pool="localroot",
name="localroot", tcpFastOpen=true, qps=100000} )
-- this one we're trying to break
newServer( {address="10.53.0.101:53", pool="recursor", name="recursor",
tcpFastOpen=true, qps=100000} )

-- localroot has a small set of frequent repeats
localcache = newPacketCache(1024, {numberOfShards=4})
getPool("localroot"):setCache(localcache)
inetcache = newPacketCache(100000, {numberOfShards=16})
getPool("recursor"):setCache(inetcache)

addAction("root-servers.net", PoolAction("localroot"))
addAction("mcast.net", PoolAction("localroot"))
-- there's way more entries obviously...
addAction(".", PoolAction("recursor"))
--end config--

Given this config my expectation would be that lookups of these would
get cached on the first hit of the performance run, and then dnsdist
would go to cache. But that's not happening - instead it's forwarding
every query to the pool and insisting it's a 100% miss rate over tens of
thousands of queries where there's actually only about 200 -unique-
questions and the responses are consistent.

> getPool("localroot"):getCache():printStats()
Entries: 1024/1024
Hits: 0
Misses: 9000
Deferred inserts: 0
Deferred lookups: 0
Lookup Collisions: 0
Insert Collisions: 0
TTL Too Shorts: 0
> getPool("recursor"):getCache():printStats()
Entries: 2200/100000
Hits: 0
Misses: 2800
Deferred inserts: 0
Deferred lookups: 0
Lookup Collisions: 0
Insert Collisions: 0
TTL Too Shorts: 0

Any ideas?

-Phillip "RootWyrm" Jaenke | prj at rootwyrm.com


More information about the dnsdist mailing list