Powered by Ubuntu. The program is in C ++. I have 2 processes running on different hosts when one is a master and one is a slave (they have no priority, only one processing request). Only one process can be a request from the master and processing. The two processes are always up, and if they fail, there is a watch dog that restarts them.
Hosts are connected by network cable.
My plan is to ask to save life from one to the other, and if the slave ceases to hold on to the master, he needs to change his condition to a master. When the wizard starts again, it first waits to save life, and in case it is not installed as the role of the wizard. if you get his role as a subordinate.
I would be glad to receive your opinion on:
How to prevent the simultaneous use of both masters? This is my main problem. When starting up and connectingvity crashes, how do you prevent 2 wizards at the same time?
Do you think it would be better to request to continue to live or send live? (in my opinion, it is better to ask him to save his life than to push)
Any other helpful tips and pitfalls would be more than welcome.
source share