I have followed a guide and created a Nginx HA Cluster with a floating IP.
(Nginx, corosync, pacemaker are being used)
The guide I followed: https://dzone.com/articles/how-to-configure-nginx-high-availability-cluster-u
I succesfully created a 2 node cluster and they are both working fine. When Node1 goes offline, Node2 is used vice-versa. My problem is that in my case, Node1 should be primary, meaning it should be always used whenever it is online.
To describe it better:
- Node1 and Node2 are online -> Node1 is being used
- Node1 goes offline -> Node2 is being used automatically
- (The problem) When Node1 comes back online, Node2 is still being used
- I need to manually stop Node2 if I want Node1 to be used again.
What do I exactly need to configure to make it automatically switch to Node1 when it is online?
Thank you in advance!