Cloud DNS TTL Calculator
See how a DNS TTL trades resolver cache hit ratio and query spend against how fast a record can fail over.
Inputs
Each caching resolver re-queries roughly once per TTL.
Resolvers do not expire in lockstep; some hold a record slightly past its TTL.
Resolver Cache Hit Ratio
89.58%
Authoritative Query Rate
83.33queries/s
Authoritative Queries Billed
216.00million/month
Monthly Query Charge
$86.40
Worst-Case Time for a Change to Land
360seconds
NXDOMAIN Cached For
900seconds
TTL Assessment
Balanced — the usual choice for records that may need to move
Step by step
Values used
Record TTL = 300 seconds; Distinct resolvers seen = 25,000 resolvers; Client lookups per second = 800 queries/s; Price per million authoritative queries = 0.4000 USD; Resolver refresh skew = 60 seconds; SOA minimum (negative cache TTL) = 900 seconds
Cloud DNS TTL
authoritative queries per second = distinct resolvers ÷ TTL; resolver cache hit ratio = 1 − authoritative rate ÷ client lookup rate; worst-case change time = TTL + refresh skew.
Resolver Cache Hit Ratio
= 89.58
Authoritative Query Rate
= 83.33 queries/s
Authoritative Queries Billed
= 216.00 million/month
Monthly Query Charge
= 86.40
Worst-Case Time for a Change to Land
= 360 seconds
NXDOMAIN Cached For
= 900 seconds
How it works
A caching resolver queries you roughly once per TTL no matter how many clients it serves, so authoritative load is resolver count divided by TTL — halving the TTL doubles your query bill while halving the time a change takes to land. Negative answers are cached separately under the SOA minimum, so a typo in a hostname can persist long after the record exists. TTL is the only DNS knob that directly buys failover speed, and it is paid for in authoritative query volume and cost. Query pricing varies by provider and by zone type, so confirm the current per-million rate with your DNS provider.
Formula
Cloud DNS TTL
authoritative queries per second = distinct resolvers ÷ TTL; resolver cache hit ratio = 1 − authoritative rate ÷ client lookup rate; worst-case change time = TTL + refresh skew.
- TTL
- Seconds a resolver may keep the answer before re-querying
- distinct resolvers
- Caching resolvers that each refresh about once per TTL
- refresh skew
- Extra time before the slowest resolver expires the record
Frequently Asked Questions
How is Cloud DNS TTL calculated?
authoritative queries per second = distinct resolvers ÷ TTL; resolver cache hit ratio = 1 − authoritative rate ÷ client lookup rate; worst-case change time = TTL + refresh skew. A caching resolver queries you roughly once per TTL no matter how many clients it serves, so authoritative load is resolver count divided by TTL — halving the TTL doubles your query bill while halving the time a change takes to land. Negative answers are cached separately under the SOA minimum, so a typo in a hostname can persist long after the record exists.
Why does Cloud DNS TTL matter?
TTL is the only DNS knob that directly buys failover speed, and it is paid for in authoritative query volume and cost. Query pricing varies by provider and by zone type, so confirm the current per-million rate with your DNS provider.
What values do I need to enter?
This calculator takes 6 inputs: Record TTL, Distinct resolvers seen, Client lookups per second, Price per million authoritative queries, Resolver refresh skew, SOA minimum (negative cache TTL). The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.