Fwd: minimum_master_nodes is explained conflict in elasticsearch.yml and Guide docs

Hi, I have a doubt point when setup a 3 master nodes cluster. Cause the
minimum_master_nodes option's annotation in elasticsearch.yml:
#Set to ensure a node sees N other master eligible nodes to be considered
operational within the cluster. Set this option to a higher value (2-4) for
large clusters (>3 nodes).

 it means minimum_master_nodes not include current node self. so

minimum_master_nodes=N/2;

but in
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-discovery-zen.html#master-election:
#The discovery.zen.minimum_master_nodes allows to control the minimum
number of master eligible nodes a node should "see" in order to operate
within the cluster. Its recommended to set it to a higher value than 1 when
running more than 2 nodes in the cluster.

it means minimum_master_nodes should include current node self. so

minimum_master_nodes=(N/2+1);

Would anyOne tell me which is right? Thanks.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CADm5%2BcqJ3xxUwyGbc%3DJpDACAMXTya1PAPQEsAYM%2Bb%3DU8LNud1A%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

N/2+1 is the better choice.

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: markw@campaignmonitor.com
web: www.campaignmonitor.com

On 13 December 2013 12:58, Wenbo Liang liangwb2001@gmail.com wrote:

Hi, I have a doubt point when setup a 3 master nodes cluster. Cause the
minimum_master_nodes option's annotation in elasticsearch.yml:
#Set to ensure a node sees N other master eligible nodes to be
considered operational within the cluster. Set this option to a higher
value (2-4) for large clusters (>3 nodes).

 it means minimum_master_nodes not include current node self. so

minimum_master_nodes=N/2;

but in
Elasticsearch Platform — Find real-time answers at scale | Elastic
#The discovery.zen.minimum_master_nodes allows to control the minimum
number of master eligible nodes a node should "see" in order to operate
within the cluster. Its recommended to set it to a higher value than 1 when
running more than 2 nodes in the cluster.

it means minimum_master_nodes should include current node self. so

minimum_master_nodes=(N/2+1);

Would anyOne tell me which is right? Thanks.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CADm5%2BcqJ3xxUwyGbc%3DJpDACAMXTya1PAPQEsAYM%2Bb%3DU8LNud1A%40mail.gmail.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAEM624bT8xDF0NRC1duq6k1Z35%3DNW58WHsnEXVM%3DdCHLyMRVRQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thank you so quick answer

Wenbo,

The minimum master node calculations always include the current node
(unless node.master is set to false, or node.client=true in
elasticsearch.yml).

I will update the elasticsearch.yml comment to match the docs.

Thanks,
Boaz

On Friday, December 13, 2013 3:27:19 AM UTC+1, Mark Walkom wrote:

N/2+1 is the better choice.

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: ma...@campaignmonitor.com <javascript:>
web: www.campaignmonitor.com

On 13 December 2013 12:58, Wenbo Liang <liang...@gmail.com <javascript:>>wrote:

Hi, I have a doubt point when setup a 3 master nodes cluster. Cause the
minimum_master_nodes option's annotation in elasticsearch.yml:
#Set to ensure a node sees N other master eligible nodes to be
considered operational within the cluster. Set this option to a higher
value (2-4) for large clusters (>3 nodes).

 it means minimum_master_nodes not include current node self. so 

minimum_master_nodes=N/2;

but in
Elasticsearch Platform — Find real-time answers at scale | Elastic
#The discovery.zen.minimum_master_nodes allows to control the minimum
number of master eligible nodes a node should "see" in order to operate
within the cluster. Its recommended to set it to a higher value than 1 when
running more than 2 nodes in the cluster.

it means minimum_master_nodes should include current node self. so 

minimum_master_nodes=(N/2+1);

Would anyOne tell me which is right? Thanks.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CADm5%2BcqJ3xxUwyGbc%3DJpDACAMXTya1PAPQEsAYM%2Bb%3DU8LNud1A%40mail.gmail.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2b6ba437-ebd9-4cab-a425-9cc56eb4d323%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks Boaz for so clear answer.

I have a doubt when there are two nodes which are eligible to become master. What should be the best choice for discovery.zen.minimum_master_nodes in this scenario.

According to document it is recommended to have minimum of 3 nodes.

If you have two regular nodes, you are in a conundrum. A quorum would be 2, but this means a loss of one node will make your cluster inoperable. A setting of 1 will allow your cluster to function, but doesn’t protect against split brain. It is best to have a minimum of three nodes in situations like this.

How can I prevent split brain when there are only two nodes sitting on different machine?

Regards,