Hi all,
I have been investigating using elasticsearch-zookeeper, this is a follow on investigation from a
post I made on elasticsearch forum.
So:
Given I have a cluster of three Elasticsearch (ES) nodes called ES1, ES2 and ES3, and a zookeeper cluster called ZC.
Issue 1:ES1 is the current master.
I drop the connection between ZC and ES1, I accomplish this by running iptables -A INPUT -s <
zookeeper cluster ip addresses> -j DROP and iptables -A OUTPUT -s <
zookeeper cluster ip addresses> -j DROP on ES1.
ES1 retains the original cluster state, ES2 and ES3 eventually elect a new master. We now have two masters.
The issue is while the connection between ZC and EC1 is down there is a chance of losing data or serving old data. Even after the split brain, the data would be in a inconsistent state due to any updates that happened on both masters.
Issue 2:ES1 is the current master.
I drop the connection between ES1 and ES2, I accomplish this by running iptables -A INPUT -s <
ES2 ip address> -j DROP and iptables -A OUTPUT -s <
ES2 ip address> -j DROP on ES1.
ES1, ES2 and ES3 has no cluster change.
I would expect that ES2 be removed from the cluster. Otherwise some updates/inserts/searches of documents would fail.
NOTE: On the above two issues when I reestablish the connection, by dropping the
iptables rules running iptables -F, the cluster state is corrected and
only one master is elected.
Any help would be greatly appreciated,
Kind regards,
Mark Tinsley