[dnsdist] Caching reverse lookups

Jon Radel radelj at folioinvesting.com
Tue Mar 19 18:59:35 UTC 2019


Tested with both dnsdist 1.2.1 and 1.3.3 under Ubuntu 18.04, I can't get 
dnsdist to cache reverse lookups of IPv4 addresses.

I would expect:

rfc1918Cache = newPacketCache(4000, 3600)
getPool("rfc1918"):setCache(rfc1918Cache)
newServer({address="65.216.248.10", pool="rfc1918"})
newServer({address="216.239.145.208", pool="rfc1918"})
addAction({'10.in-addr.arpa'}, PoolAction("rfc1918"))

to cache lookups of addresses in 10.0.0.0/8.  It doesn't appear to do so:

 > getPool("rfc1918"):getCache():printStats()
Entries: 32/4000
Hits: 0
Misses: 32
Deferred inserts: 0
Deferred lookups: 0
Lookup Collisions: 0
Insert Collisions: 0
TTL Too Shorts: 0

are the stats of doing the same lookup 32 times in a row.

On the other hand:

foliofnCache = newPacketCache(5000, 3600)
getPool("foliofn.corp"):setCache(foliofnCache)
getPool("eap.foliofn.corp"):setCache(foliofnCache)
newServer({address="10.80.7.78", checkType="SOA", 
checkName="foliofn.corp", mustResolve=true,  pool="foliofn.corp"})
newServer({address="10.80.44.81", checkType="SOA", 
checkName="foliofn.corp", mustResolve=true,  pool="foliofn.corp"})
newServer({address="10.80.54.41", checkType="SOA", 
checkName="foliofn.corp", mustResolve=true,  pool="foliofn.corp"})
newServer({address="10.80.7.79", checkType="SOA", 
checkName="foliofn.corp", mustResolve=true,  pool="foliofn.corp"})
newServer({address="10.80.23.79", checkType="SOA", 
checkName="foliofn.corp", mustResolve=true,  pool="foliofn.corp"})
newServer({address="10.80.44.21", checkType="SOA", 
checkName="foliofn.corp", mustResolve=true,  pool="foliofn.corp"})
addAction({'foliofn.corp'}, PoolAction("foliofn.corp"))

appears to cache just fine:

 > getPool("foliofn.corp"):getCache():printStats()
Entries: 1/5000
Hits: 21
Misses: 1
Deferred inserts: 0
Deferred lookups: 0
Lookup Collisions: 0
Insert Collisions: 0
TTL Too Shorts: 0
 >

is the result of doing the same lookup in foliofn.corp 22 times in a row.

Am I missing something?

-- 
--Jon Radel

Sr. Network Engineer
Folio Financial, Inc.
8180 Greensboro Drive, 8th Floor
McLean, VA 22102
(T) 703-245-4844
(M) 703-861-5128
(E) radelj at folioinvesting.com
www.folioinvesting.com



More information about the dnsdist mailing list