It looks like answer to question #1 is the use of a stick-table
stick-table type ip size 1 nopurge stick on dst On 09/12/16 11:13, Michele Mazzucco wrote:
Hello, I have two HAProxy servers configured with a floating IP, providing a hot standby solution. The listen configuration looks like: listen my_backend bind <floating_ip> option mysql-check ... server mysql1 <ip_mysql1> source <floating_ip> server mysql2 <ip_mysql2> source <floating_ip> backup ... I would like to know if the following are possible: 1 - Due to the "backup" keyword, mysql2 is employed *only* when mysql1 is unavailable. Whenever mysql1 becomes available, however, it will be used, leading to possible consistency problems. Is it possible to keep mysql2 as primary once mysq1 comes back online? 2 - By using the "source" keywork in the server lines the floating IP is employed when communicating with the MySQL servers, including periodic checks. Is is possible to use the static HAProxy IP for checks and the floating IP for SQL transactions? The rationale behind that is that checks are performed by both HAProxy servers while SQL transactions are carried out only by one. Thank you, Michele