How to set up failover for a single web server using two ISPs

apache-2.2domain-name-systemfailoverload balancing

I have one web server and two WAN connections (1 cable, 1 DSL). DNS is run offsite, and points to the IP address assigned by one of the ISPs. How can I have the second connection take over when the primary one fails?

I have seen that it is possible to have two A records, each pointing to a different IP, but it has several problems. What's the real solution to this? I imagine this is a very common issue.

Additional information:

The server is actually an electronic medical record server, and has to be on-site at the office. Their website and DNS is hosted at a large managed hosting facility.

I think the plan on the office side is something like the Peplink Balance previously mentioned or Cradlepoint MBR-1200.

The Peplink with switching DNS sounds like a solution, but I'm not sure how comfortable I am having the DNS in their office instead of the datacenter. I will look further into this for sure.

After talking to our hosting facility, they recommended we look into a third party service like Dynamic DNS. I believe it's basically a monitoring service which switches when one IP goes down.

Speed really isn't an issue; they're more concerned with high availability.

Best Answer

I imagine this is a very common issue.

Actually no. Most even smaller websites run with hosters who handle that. The hoster has multiple uplinks, his own address space and announces his routing via BGP to the peers.

This is also a lot more bandwidth efficient as basically... the uplink speed of a typical end user connection is horrible.

I would say that most people "unprofessional" enough to try running a website from behind a cable / DSL link.... also do not have two connections.