The check-for-live-server controls what happens when a master broker is
*started*. If it's false then it will activate even if there is already
another broker on the network with its ID, but if it's true then it will
check first and if it finds another broker on the network with its ID then
it will become a backup to that broker.

On the other hand, a replication slave *always* starts as a backup no
matter what.

If you want to mitigate split brain in this case then you need a proper
quorum. In order to get this you can either configure 3 master/slave pairs
or you can integrate with ZooKeeper via the pluggable quorum vote
replication configuration [1]. A single master/slave pair simply cannot
avoid split brain in every possible situation.


Justin

[1]
https://activemq.apache.org/components/artemis/documentation/latest/ha.html#pluggable-quorum-vote-replication-configurations

On Wed, Apr 6, 2022 at 10:06 AM Gunawan, Rahman (GSFC-703.H)[Halvik Corp]
<[email protected]> wrote:

> Hi,
> I would like to recommend to add configuration "<check-for-live-server>"
> to backup server.  I tested artemis replication mode with the following
> configuration:
> Primary:
>      <ha-policy>
>          <replication>
>             <master>
>
>  <vote-on-replication-failure>true</vote-on-replication-failure>
>                <check-for-live-server>true</check-for-live-server>
>             </master>
>          </replication>
>       </ha-policy>
>
> Backup server:
>       <ha-policy>
>          <replication>
>             <slave>
>               <allow-failback>false</allow-failback>
>              </slave>
>          </replication>
>       </ha-policy>
>
> We also enable ping on both primary and backup server.
>
> 1.      When the network card in primary was disabled, after around 2
> minutes, the backup server went live while the primary server was still
> isolated from network.
>
> 2.      After network card in primary server was enabled, artemis in
> primary woke up but it detected a live server was already active so it
> announced as backup.
>
> 3.      Then, network card in the backup server was disabled, after around
> 2 minutes, the primary server went live while the backup server was still
> isolated from network.
>
> 4.      After network card in the backup server was enabled, the backup
> server woke but because there was no configuration to check for live
> server, it went live while the primary server also live (split brain issue).
>
> Any reason why the backup server doesn't have configuration
> "<check-for-live-server>"?
> Thanks
>
> Regards,
> Rahman
>

Reply via email to