What's wrong with my cluster (Notebook + Server)?


(FAGIM SADYKOV) #1

I'm just newby to ES, so may be my question is wrong.

I have small ES cluster with following structure:

  1. 1'st node placed on a server with web-application attached to it
  2. 2'nd node placed on my notebook for developing proposes
  3. Both nodes see each other with zen-unicast:
    discovery.zen.ping.multicast.enabled: false
    discovery.zen.ping.unicast.hosts: [ "other-node-ip" ]
  4. Server's node is "always on" and notebook's node is "sometimes on"
  5. While server's node is always on it serves as master

My problem is synchronization of shards after reconnecting nodes.
After connecting and electing master it always synchronize shards master->replica

But I expect to have merging of shards - so i expect to see all new documents in both nodes but for now if i make changes to notebook's node offline and then connect to server - my local data is lost.
Same thing in production - how to setup 2-node "with data" cluster where any of node can die and then recover from other?


(Mark Walkom) #2

It won't merge because then there may be data inconsistency.

In production you don't have nodes constantly disconnecting, so this isn't an issue.


(FAGIM SADYKOV) #3

Ok, for now i know that it's calling "split-brain" and i see that ES exactly cannot support two-master merge due to posibility gain very invalid state. Will do master:false, data:false on notebook and isolated developer cluster with manual synchronization with production


(Mark Walkom) #4

That's a really bad idea. Really, really bad.


(David Pilato) #5

I'd probably use SNAPSHOT feature.
Snapshot from the prod. restore on the laptop.

But I'd not add a node to the PROD cluster like this.


(system) #6