2 master nodes and share data


#1

Hello everyone,
I really want to know if I have 2 master nodes with configuration "node.master: true and node.data:true" How are they save the data ? Are they going to share the data? 50% and 50%? or are they going to have the same data in every server?
I am looking to share the data between two servers with the same characteristics (high ram and hard disk) but I can not find any documentation about " two servers and share data 50%"

If you have any ideas please let me know
Thanks a lot


(Christian Dahlqvist) #2

This will depend on how many replicas you have configured for your indices. If you set it to 0, only one copy of the data will be stored and it will be shared across the two nodes. This naturally don't give you any high availability as part of the data will be unavailable when a node is unavailable. If you set replicas to 1, each shard will have a primary and a replica shard, and both nodes will each hold one of these. In this case all the data will be stored on both nodes.


(system) #3