1

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!

3
  • 3
    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, 2009 at 2:43
  • 3
    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, 2009 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, 2012 at 15:51

5 Answers 5

2

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.

0
9

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.

2
  • 1
    +1 for mentioning that not everyone obeys DNS TTLs...it'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, 2009 at 2:45
  • 1
    DNS servers can withstand quite a lot of load, I imagine.
    – Seun Osewa
    May 11, 2011 at 0:24
1

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.

0

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).

1
0

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

http://doc.powerdns.com/pipebackend-dynamic-resolution.html

1
  • I'm having trouble seeing how that addresses the various points in the question. Jan 13, 2011 at 2:01

Not the answer you're looking for? Browse other questions tagged .