how do you determine what is the master and what is not in your file?

Why not have it always running on one node and if that one doesnt respond - use the other?