Let's say there are some servers where configured with database replication, synchronize files.
Need to perform some task on schedule, for example, the server No. 1 falls, and automatically changes the ns record with the new IP for a domain (server No. 2), but what about the tasks? That is, that they guaranteed would not run simultaneously on different servers.
keepalived, ucarp is not considered?
only the server needs to be on the same network, don't know how it sounds scientific, so to speak have to look at a single gateway.
jessy_Daugherty answered on July 2nd 19 at 18:10
Look at Ansible. You can create an inventory file from different servers, or server groups, use applied to them different roles. Let you have a cron runs every minute playbook, or even a simple bash script that pings the server, and in the absence of a response to perform the necessary tasks. In the case of Ansible, you can do it on multiple machines at once.
dominique answered on July 2nd 19 at 18:12
So you need to when you run the Kron task on each server was check first and main it is the server, then the scan task run or not run, for example if you have changed a DNS record that the server can compare and brezovitsa is domain in IP of this server, Yes - running task, no - skypem tasks.
It's easy enough you can implement in bash.
anderson7 answered on July 2nd 19 at 18:14
I would "bike" was written and it would separate the server is made which does not fall, it seems the most simple.