0

I have a server with system.domainname.com

I have set up a mirrored site, that gets all data copied to it every hour.

So if server1 crasches I could just tell everyone to go to server2 and everything should be fine.

Ideally I should just change the domain so that it points to server2 instead. But I know that this could take some time and I would like to have it be instantaneous. How can I do this?

pldimitrov
  • 143
  • 1
  • 8
Andreas Larsson
  • 135
  • 1
  • 4

2 Answers2

3

With a load balancer.

For this specific case, you put something up in front of your server (it could be a proper load balancer appliance, like an F5, or just a reverse proxy, or even a router - many Cisco routers have this functionality as well) and configure it such that it doesn't send requests to a host that is down.

How, exactly, you do that depends on which solution you go with, exactly.

Alternately, there are products and services that offer automatic DNS failover (Google it), but your mileage may vary - DNS isn't really designed to be used this way, so it doesn't really work that well.

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
0

Ideally I should just change the domain so that it points to server2 instead. But I know that this could take some time and I would like to have it be instantaneous.

30 seocnds too much? That is the TTL on cloudflare.

How can I do this?

Both serves react to the same IP. This is done using a load balancer. Or it is done using a script checking every second and then reconfiguring the IP's on the servers - which obviously have to be in the same data center and routing for the handover to just work.

TomTom
  • 50,857
  • 7
  • 52
  • 134