Size a resolver cache and predict its hit ratio from query rate, unique names and record TTL.
Each distinct name has to be fetched from upstream once per TTL, so the miss rate is the working-set size divided by the TTL — independent of how often clients ask. Everything else is served from cache, and memory follows from the number of entries held. Cache sizing decides both resolver memory and upstream load: shortening TTLs from 300 to 30 seconds multiplies authoritative query volume tenfold without changing client behaviour at all.
DNS Cache
cached entries = min(unique names, query rate × TTL); misses per second = unique names ÷ TTL.
Cache hit ratio
hit ratio = 1 − misses per second ÷ query rate
cached entries = min(unique names, query rate × TTL); misses per second = unique names ÷ TTL. Each distinct name has to be fetched from upstream once per TTL, so the miss rate is the working-set size divided by the TTL — independent of how often clients ask. Everything else is served from cache, and memory follows from the number of entries held.
Cache sizing decides both resolver memory and upstream load: shortening TTLs from 300 to 30 seconds multiplies authoritative query volume tenfold without changing client behaviour at all.
This calculator takes 4 inputs: Query rate, Distinct names in the working set, Average record TTL, Memory per cache entry. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.