0

We have a moodle webserver with 2 Public IPs (different ISPs). Is it possible to make a mechanism, to access the website with other IP, if the first ISP connections fail? We have added 2 public IPs in DNS records. But found some articles say that multiple IPs in DNS do not provide a failover mechanism.

Kindly suggest a way to achieve a failover. Thanks in advance.

iamsumesh
  • 145
  • 6
  • 1
    DNS just serves the name you request and give you an IP (one of the two randomly, dep. on config) ; it doesn't know (and care) if the other end of the IP is alive or not responsive. You could have your own authoritative DNS server that tests if the IPs are alive and stop serving a failed one (with a low TTL) – Déjà vu Sep 03 '20 at 14:58
  • I would suggest either hosting your moodle website on a VPS in the cloud or add some devices in between if you want to host it on premise, i.e. a firewall and load balancer. – Tommiie Sep 08 '20 at 11:19

2 Answers2

2

Two IP addresses on two ISP are not a failover : they are load-balanced. If one fail, the clients will not be able to join your server if the client is not enough intelligent to test the second one. If you want to be always up, you will need to manage the failures on each side. You may redirect all the requests from one IP to the other one in case of server failure, but the clients will continue to access both your IPs

Dom
  • 6,628
  • 1
  • 19
  • 24
1

You need something that control the nameserver/DNS for having that to work correctly.

I know a appliance that do that, but essentially it do that, maybe some router do that too, for that I don't know.

  • It set a really low TTL for the DNS entry of the website.
  • Two appliance on both WAN.
  • It detect when a link goes down, the remaining appliance update the DNS zone to remove the dead link reference.
  • When it get up the appliance reset the DNS zone as expected.
yagmoth555
  • 16,300
  • 4
  • 26
  • 48
  • Thanks. Currently, we changing the ip addess entry in the dns server. it works. One issue we faced on the client-side is that it is taking some time to update ip address (due to previous high TTL). May I ask one more query. is there any mechanism to handle this failover automatically. any application/software to handle this failover automatically. – iamsumesh Sep 03 '20 at 15:14
  • @iamsumesh I only know hardware that do it, I tested elfiq gear in the past that do that, surelly other brand do that too, as elfiq tend to cost high – yagmoth555 Sep 03 '20 at 15:39
  • Thanks for the suggestion. – iamsumesh Sep 03 '20 at 15:48