I can only answer shortly. Sorry

For the checks I would configure another backend section that only does the
checks and is not used by any frontend.
Then I would use the "track" keyword in you current backend.

Sorry again for the answer.

.marcoc

Il 09 dic 2016 11:39 AM, "Michele Mazzucco" <michele.mazzu...@qnective.com>
ha scritto:

> 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
>>
>>
>>
>

Reply via email to