Q:

Free DNS software with failover support?

I'm looking for DNS software that can accomplish the following:

Check health of all A records at set intervals
If server is unresponsive after multiple successive checks, replace A record with a working server
When a server is down, check it periodically. Once it's up, restore normal A records

Here's an equivalent I thought of:

Run DNS servers with very low TTL (minutes)
Use a cron job to periodically query all webservers
Use sed to replace A records if need be, and then restart DNS server

I have a hard time believing there isn't already something that can accomplish the above. I'm not looking for a paid service, and I'm restricted to anything I can run with root access to a VPS. Any suggestions would be great. Thanks!

A:

Unfortunately, you've got a problem there. Normal practice is to set A records with fairly long TTLs (time to live). The A records persist in the cache of any DNS server that's queried yours for as long as the TTL says. This means that in order to swap the A records, you'd have to have very short TTLs (not a good idea because it really ups the load on your DNS server). And of course, you'd have to depend on everyone actually obeying the very short TTL.
I think what you are trying to do is to failover a service at the DNS level instead of at the IP level. And that's not what DNS was designed for, nor is it something that DNS is good for. You want a different failover solution - the one you've proposing is going to strain DNS in ways it wasn't meant to be strained.

A:

Another option you could look into is to have you secondary/backup server do the test via cron and if it fails update dns itself using a dyndns update script to change the dns record.  Should be simple to modify any of the scripts.  Plus their are a lot of free DNS services such as everydns and editdns that support dyndns http update formats. 

