What DNS failover is#
DNS failover means automatically switching users to a backup server when the primary goes down. In an ideal setup, a health check detects failure, DNS stops returning the failed server’s IP, and clients resolve to a healthy backup. Users get continuity without manual intervention.
Edge DNS geo-routing#
Edge DNS supports geo-routing: routing different users to different servers based on their location. This works today. For example, you can return IP A for users in Europe and IP B for users in the Americas. This is useful for multi-region deployments where you want users to hit the nearest origin.
Configure geo-routing in the console or via the API. Add A (or AAAA) records with geographic filters and specify which regions resolve to which IPs.
Multiple A records for round-robin#
You can add multiple A records for the same hostname. Resolvers typically round-robin between them. This distributes load across several servers but does not provide automatic failover: if one IP is down, clients may still be directed to it. DNS does not remove unhealthy IPs automatically.
Monitoring DNS with Edge metrics#
Edge provides DNS metrics: query volume, response times, and resolution data. Use these to monitor DNS health and spot anomalies. They complement application-level monitoring but do not replace health checks for failover logic.
Health-check-based failover: not yet implemented#
Workarounds#
- External monitoring and API updates: use an external monitoring service (e.g. UptimeRobot, Pingdom) to check your endpoints. When a failure is detected, call the Edge API to update DNS records, for example to remove the failed IP or add a CNAME to a backup. Requires automation (a script or Lambda) and API access.
- CDN as a resilient layer: put Edge CDN in front of your origin. The CDN caches static content and can fail over to a backup origin if configured. For dynamic content, origin health still matters, but the CDN adds redundancy for cached responses.
- Manual failover: the console and CLI always allow manual record updates. For planned maintenance or known outages, switch records manually. It isn’t automated, but it’s reliable.
Keep learning
Best practices3 min read
High availability
Edge's built-in redundancy, and how to design your applications for resilience when things fail.
Background3 min read
Is DNS centralised or decentralised?
DNS was designed as a distributed system, yet in practice a handful of providers answer most of the internet's queries. That gap between design and reality matters.
Tutorials3 min read
Setting up a multi-region CDN
Edge CDN is global by default, across 988 locations. Unlike AWS, you don't configure regions: the network routes requests to the nearest node automatically.