Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|improve this question

closed as not constructive by Chris S Nov 7 '12 at 15:51

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

it's not that hard to believe. most people who need load-balancing or fail-over or both realise pretty quickly that DNS is a very poor tool for the job and use a real load-balancer (either some proprietary box or free software like Linux LVS). – cas Aug 24 '09 at 2:43
And they're also hopefully smart enough to know that free services disappear regularly and aren't reliable enough to be worth dealing with for a service which is apparently so business-critical that a few minutes downtime for a manual DNS change is unacceptable. – womble Aug 24 '09 at 2:56
Shopping Questions are Off-Topic on any of the Stack Exchange sites. See Q&A is hard, lets go Shopping and the FAQ for more details. – Chris S Nov 7 '12 at 15:51
up vote 2 down vote accepted

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.

share|improve this answer
+1 Thanks! I'll look into this further. – Lin Aug 30 '09 at 18:05

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.

share|improve this answer
+1 for mentioning that not everyone obeys DNS's NOT something that you can rely on, there are lots of broken/deliberately misconfigured name-servers out there on the net. if it were possible, I'd give another +1 for pointing out that DNS is not a good failover 'solution'. – cas Aug 24 '09 at 2:45
DNS servers can withstand quite a lot of load, I imagine. – Seun Osewa May 11 '11 at 0:24

See my answer to this somewhat related question.

As Craig alluded to in this comments, pretty much if failover is what you're after, then DNS is not the answer. It's simply not designed for it.

DNS can provide rudimentary load balancing, but it's not good for short lifetime dynamic changes.

share|improve this answer

It's not free which removes them from your requirements, but other people searching for this query might find this useful.

The team at DNS Made Easy offer this on their higher level plans, and they're very reasonably priced ($60/year). I've no association with DNS Made Easy except that we're a client of theirs and they solved all our DNS problems.

You will never find this kind of functionality for free from a 3rd party. It's just too expensive for a them to offer. In fact, you'll never find any kind of hosting of anything that's any good for free. (Note that this does not apply to FOSS before anyone starts hammering on about it).

share|improve this answer
Nice, I didn't know they offered that. We are already a paying customer. – Echo Sep 10 '09 at 14:31

You can explore PowerDNS. It supports piped backend and also DB as a backend. This will let you return a dynamic update.

share|improve this answer
I'm having trouble seeing how that addresses the various points in the question. – John Gardeniers Jan 13 '11 at 2:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.