Reputation: 36663
We would like to implement a kind of limited high availability with ActiveMQ Artemis in three or preferably two nodes. I've been given to understand from this post that you need at least one and preferably three zookeeper nodes to assure HA.
However, the type of data we're tracking is sensor monitoring, so it's not necessarily mission critical. A little bit of data loss is probably ok, but we'd like to leverage Artemis HA/replication to mitigate this as much as possible.
So my question is, is it at all possible to use Artemis HA in a two-node scenario? What's the best way to mitigate the split brain scenario in this case?
Also, if we go to a three-node solution, this documentation describes it, but I'm not totally clear on some parts of it. A working example or demo would be nice. Is there anything to reference besides the documentation?
Edit: I did find the "examples" folder, which has lots of HA items. I'll take a look at that.
Upvotes: 0
Views: 715
Reputation: 35008
It is possible to use a single primary/backup pair with replication. The problem is that there's no mitigation for split brain in that situation, and therefore it is not recommended. However, if you're willing to accept the risks that come with this configuration then it would be viable.
The recommended, minimum viable configuration for replication is a single primary/backup pair of brokers and a single ZooKeeper node (3 "nodes" in total). However, as noted on my other answer, if there is just one ZooKeeper node then this becomes a architectural weakness because if that node fails then high availability semantics may be impaired. The documentation recommends 3 or more ZooKeeper nodes for this reason.
You also have the option of using a single primary/backup solution with shared storage.
Upvotes: 1