# Newbie help

**URL:** <https://discuss.elastic.co/t/newbie-help/3560>\
**Category:** Elasticsearch\
**Created:** [November 12, 2010, 12:57pm UTC](https://discuss.elastic.co/t/newbie-help/3560 "2010-11-12T12:57:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mustafa\_Sener](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@Mustafa\_Sener](https://discuss.elastic.co/u/Mustafa_Sener)\
**Post date:** [November 12, 2010, 12:57pm UTC](https://discuss.elastic.co/t/newbie-help/3560/1 "2010-11-12T12:57:58Z")

</div>

Hi,  
I am quite new to ES and currently doing some experiments to evaluate it. I  
am trying to figure following case:

Assume That

1. we started two nodes on two different PC
2. We create a index with 2 shards and 1 replicas
3. One of the primary shard goes to first node and other goes to second  
node
4. Two application writing data to these nodes. And also assume that  
applications run on two different PC.
5. If the connection between these nodes goes away each ES nodes will  
declare their replicas as primary and application will continue write the  
data to their local nodes
6. Now, we have two nodes with different data on each

Now, I want to ask some questions:

## What will happen if connection comes back? Will the nodes discover each other? (I read from user list that one of them should be restarted to rediscover each other) What will happen if I restart one of the nodes after connection comes back? What will happen to data written on restarted node?

Mustafa Sener

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [November 12, 2010, 1:33pm UTC](https://discuss.elastic.co/t/newbie-help/3560/2 "2010-11-12T13:33:34Z")

</div>

Hi Mustafa

> ```
> 1. Now, we have two nodes with different data on each
> 
> ```

This is known as a split brain.

> What will happen if connection comes back? Will the nodes discover  
> each other? (I read from user list that one of them should be  
> restarted to rediscover each other)

That is correct

> What will happen if I restart one of the nodes after connection comes  
> back? What will happen to data written on restarted node?

The data on the other node will be lost and will need to be reindexed.

Currently there is no way of merging these two clusters back together.

This issue in master allows you to configure your cluster to reduce the  
likelihood of this situation, by preventing writes unless a quorum of  
nodes is present:

> <https://github.com/elastic/elasticsearch/issues/444>
>
> When performing a "write" operation, allow to control if it can be performed onl…y when \`one\` shard is active, a \`quorum\` of shards are active (within a replication group), or \`all\`.
> 
> This can be controlled per API call (REST parameter is \`consistency\` and can be set to \`one\`, \`quorum\`, or \`all\`. It defaults to a node level setting of \`action.write\_consistency\` which in turn defaults to \`quorum\`. This basically means that the default is \`quorum\`.
> 
> What does this means? Basically, in a 1 shard with 2 replicas, there will have to be at least 2 shards active (\`quorum\`) within the cluster for the operation to be performed.
> 
> In a 1 shard with 1 replica, at least 1 shard will need to be active (in this case \`quorum\` and \`one\` is the same).

This doesn't solve the issue, but at least will make you aware that  
there IS an issue, because your writes will start failing.

clint

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:16am UTC](https://discuss.elastic.co/t/newbie-help/3560/3 "2017-07-06T04:16:40Z")

</div>


