3

We have two ISP's and both ISPs' IP NAT with the same webserver IP. I want failover for incoming traffic, is there any open source solution? Can I do it by making two name servers, one for each ISP?

I am not sure but as per my knowledge the primary and secondary name server will reply in a round robin fashion till they are live. Once any name server will be unreachable then only another will be replying, so if I am right then I think I can do incoming failover by making two name servers in my office...

Peter Mortensen
  • 2,319
  • 5
  • 23
  • 24

4 Answers4

1

The name server solution is the simplest option, but you must set the TTL according to your needs. There are a lot of discussions regards TTL. We are using name servers with low TTL from several years and this solution works well for us, but if you want a real and prompt failover system you must go on more complex solution like BGP, if your ISP support it.

Little sample (with very simple TTL explanation) of failover by name servers.

Type A record in both dns server: www.domain1.com 1.1.1.1 TTL 10 (1.1.1.1 is the public ip of primary ISP)

When primary ISP fails you must change the A record of www.domain2.com to 2.2.2.2 (where 2.2.2.2 is the public ip of failover ISP).

TTL tells to client (browsers and other name servers) around the world that the ip address for www.domain1.com is valid for 10 seconds. After 10 seconds the client must re-ask ip to name server.

This link can explain better, also why this is not a perfect solution.

lg.
  • 4,579
  • 3
  • 20
  • 20
  • dear little more explanation how TTL use for incoming load balancing for werserver or mailserver ( with two Public IP) –  May 27 '10 at 07:39
1

Vyatta comes to mind, it can do WAN loadbalancing.

http://www.vyatta.com/downloads/index.php

Maybe try on their forums for suggestions on how:

http://www.vyatta.org/forum/index.php

NginUS
  • 468
  • 1
  • 5
  • 13
0

You might want to check http://gdnsd.org/

gdnsd is an Authoritative-only DNS server which does geographic (or other sorts of) balancing, redirection, weighting, and service-state-conscious failover at the DNS layer.

I have configured it myself to load balanced my 2 vps, as both of them are not reliable and gdnsd is able to correctly served the IP for the VPS that are active at that time

-1

Have you looked at CARP?

gbroiles
  • 1,344
  • 8
  • 8
  • From your CARP link: CARP is a protocol which allows multiple hosts on the same local network to share a set of IP addresses. Thus CARP is not applicable, because sahil needs failover with two public ip addresses. – lg. May 27 '10 at 07:33
  • If the original question is looking for a way to route around a failed network link (not a failed server), then I agree CARP is not the best solution, though I don't think DNS tricks are either. If the question is "I have a multihomed network, how do I route around a failure on one of the links?", then as far as I know the correct answer is "Get your own ASN, and run a router capable of BGP". But I suspect if that were possible, it would already have been done - I think the practical answer is to move the services to a VPS/colo site that's not behind a flaky network link. – gbroiles May 27 '10 at 17:18