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.
About Cloud DNS TTL Calculator
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
Worked example
With the default values below, Cloud DNS TTL Calculator returns Resolver Cache Hit Ratio of 89.58%. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Record TTLaccepts 1–604,800 seconds
- 300 seconds
- Distinct resolvers seenaccepts 1–100,000,000 resolvers
- 25,000 resolvers
- Client lookups per secondaccepts 0–100,000,000 queries/s
- 800 queries/s
- Price per million authoritative queriesaccepts 0–100 USD
- 0.4 USD
- Resolver refresh skewaccepts 0–86,400 seconds
- 60 seconds
- SOA minimum (negative cache TTL)accepts 0–86,400 seconds
- 900 seconds
Results
- 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
- TTL Assessment
- Balanced — the usual choice for records that may need to move
Step by step
- 1Values used
- 2Cloud DNS TTL
- 3Resolver Cache Hit Ratio= 89.58
- 4Authoritative Query Rate= 83.33 queries/s
- 5Authoritative Queries Billed= 216.00 million/month
- 6Monthly Query Charge= 86.40
- 7Worst-Case Time for a Change to Land= 360 seconds
- 8NXDOMAIN Cached For= 900 seconds
Assumptions and limits
- The result is derived only from the 6 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
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.
