Failover is a powerful yet simple tool that automatically updates your DNS records depending on resource availability.
It’s like a regular DNS record that points a domain to an IP address or hostname, but you can also specify a backup endpoint. The backup is only used if the primary is unavailable.
It’s like a plan B for your DNS in case your plan A fails.
Before we get into the technical stuff, let’s go over some basic terminology.
Query: The request an end-user makes to resolve a domain to an IP address or hostname.
Endpoint: This can be either an IP address (like 172.08.260.1) or a hostname (like dnsmadeeasy.com).
You will need a basic knowledge of how a DNS queries are answered. Here’s a quick refresher.
How It Works
In this example
In this case, it’s an A record that returns an IP address of 127.0.0.1.
But what would this look like if it was a failover record?
Notice how the record lists more than one IP address. The second one will only be used if the first is unavailable.
What’s Going on in the Background:
DNS Made Easy uses a system of monitoring nodes to routinely monitor the health of the endpoints in the record. Our monitoring nodes check your primary IP’s availability every 2-4 minutes.
If the primary IP fails to respond from two different monitoring locations, it is considered down.
Failover will automatically update the record to point to the secondary IP address. The record changes will be instantly propagated to all nameservers in the DNSME network and an email alert will notify the account admin of the Failover event.
Monitoring nodes will continue to check the availability of the downed primary system until it is available again.
If the primary comes back online, the record will be updated to point to the primary IP.
You can add up to 4 different backup IP addresses in a Failover configuration. That means, if you secondary IP is unavailable, traffic will be answered by your tertiary IP address and so on.
You can learn how to set up DNS Failover for your DNS Made Easy account by following the tutorial here.
We recommend using a lower TTL (Time to Live) for your failover records. Even though the record updates are instantly propagated to our network, the old record values could be cached by resolving nameservers and won’t update until the TTL expires.
Also published on Medium.