Free ops runbook · DNS

DNS failover: TTL, negative caching and the record that would not move

You changed the record and the old IP is still served. TTL is only one part: resolvers cache negative answers, clients cache their own lookups, and a health check can keep failing over to the same broken target.

TTL is a ceiling

Resolvers may cache longer; clients and OS resolvers add their own layer.

Negative caching

NXDOMAIN is cached for the SOA minimum TTL, often much longer than the record TTL.

Health-check flapping

A false positive moves traffic to a target that is up but wrong (old version, wrong region).

Split horizon

Internal and external resolvers can return different answers; a failover test must cover both.

Detect

Ask several resolvers

CommandWhat it shows
dig +trace nameThe delegation path and which zone answers.
dig @1.1.1.1 name / @8.8.8.8Whether public resolvers agree.
dig name SOAThe negative-cache TTL (minimum field).
dig name CNAMEA CNAME at the apex or a chain that clients resolve differently.
Failover drill

Test the move, not the record

Lower TTL before

Drop to 60s a day before the change, then move; raise it after the new target is stable.

Watch the clients

Application logs and health checks, not just dig from your laptop.

Keep the old target warm

Rollback is another DNS change; do not tear it down immediately.

Test negative paths

What happens when the name does not resolve at all? Timeouts and retries matter.

Keep going

This page is free. The paid runbooks cover the operational failures around it, with detection commands, five failure modes and a migration checklist.