Let's say if I have two mysql databases, db1 and db2. Is that possible to configure haproxy to work like that:
- In the beginning: db1 work as master and db2 as backup.
- The haproxy will promote db2 as master when db1 is down.
- The haproxy will not use db1 even when db1 is recovered.
- The haproxy will promote db1 as master again when db2 is down.
I have read some answers in stackoverflow. But they only figure out the first 3 requirements. ( such as HAProxy switch only in case of server down )
Thank you for your time.
PS: My Platform: Redhat Haproxy Version: 1.5.2