Ny open source solution for failover of incoming traffic

failovernameserveropen source

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…

Best Answer

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.

Related Topic