InfraNestInfraNest
DNS

DNS Failover

DNS Failover is a high-availability technique in which a DNS provider monitors the health of backend endpoints and automatically directs traffic away from failed services by updating which IP address it returns in DNS responses.

DNS Failover is a high-availability technique where a DNS provider continuously monitors the health of backend endpoints and dynamically changes the DNS records it serves, so client requests are routed only to healthy servers.

How it works

A DNS failover system performs regular health checks on each backend endpoint (typically via HTTP, TCP, or custom probes). When a check succeeds, that endpoint remains in the DNS answer pool. When a check fails, the DNS provider stops returning that endpoint's IP address in responses. Clients making fresh queries then receive only the healthy IP, and their connections succeed.

The key difference from a load balancer is that failover happens at the DNS layer: it doesn't intercept active connections, it just changes which IPs clients learn about.

Example

You have two application servers:

  • app1.example.com → 192.0.2.10 (primary)
  • app2.example.com → 192.0.2.20 (backup)

Your DNS failover policy says: return 192.0.2.10 if it passes health checks; if it fails, return 192.0.2.20 instead. When app1 goes down, health checks fail, and new DNS queries receive 192.0.2.20. Existing connections to app1 are lost, but new clients connect to the healthy backup.

When it matters

Failover is useful for unplanned downtime scenarios and reduces manual intervention. Combined with a short TTL, it limits how long clients hold stale records. For truly seamless failover without connection loss, use a load balancer or reverse proxy in front of your servers.

TipDNS failover depends on clients respecting TTL and making new queries; it cannot salvage existing connections to a failed server. Pair it with low TTL values and uptime monitoring for best results.

Related terms

See it in context

InfraNest shows you your own records, zones and certificates, so the terms stop being abstract.

Free plan · No credit card required · Set up in minutes