S
S
Slava Kryvel2017-08-23 16:54:54
linux
Slava Kryvel, 2017-08-23 16:54:54

How to switch to a backup server?

Good afternoon!
The task is to ensure the continuous operation of several services.
There are two servers - primary and backup. They are hosted by different hosts.
If the main server is unavailable, clients should be directed to the backup server.
What are the options for solving this problem? It is necessary that the availability of services tend to 100%
Server on Linux.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
X
xmoonlight, 2017-08-23
@xmoonlight

1. DNS roundrobin
2. Client roundrobin - when the client itself sorts out IP-shniks. This is possible if the application has already been downloaded and can be run offline.

A
amambaru, 2017-08-26
@amambaru

In DNS, in the A record, specify both IP addresses.
The browser will turn to the first person to respond.
But this is the easiest part.
You also need to constantly synchronize the database between servers - this will already be a gem.

B
Boris Korobkov, 2017-08-23
@BorisKorobkov

Round robin DNS is used to distribute the load on different servers, but this has nothing to do with fault tolerance
For fault tolerance, they usually do this:
- Check the availability of the main server every minute with a script
- If it is not available, then specify the IP of the backup server in the A-record via the DNS provider API .
- If it was not available, but is now available, then specify its IP.

T
Tr3m, 2017-08-24
@Tr3m

VIP + HA cluster (like pacemaker)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question