Elastic try to insert document in unassigned shard


(Ankit Chelawat) #1

Hi,

I created an index with number of shard : 3 & number of replica : 0 and inserted some documents in it. After some time one of my node is down and cluster health goes to RED. Now I again insert some documents in index.

Expected outcome
All documents should be inserted in index. Elastic should insert document in remaining primary shard.

Actual outcome
some documents inserted in index while some failed due to unassigned shard.

I Created 3 node Elastic cluster with discovery.zen.minimum_master_nodes: 2.

Is my expectation correct?


(Christian Dahlqvist) #2

No. Documents will be assigned to a shard based on a hash of the key. If that shard is not available the indexing operation will fail.


(Ankit Chelawat) #3

We appreciate your quick help.

We are designing ES Cluster. How to design the cluster so that complete cluster will not go down due to one node. It is acceptable to have data un-available which is present on the node which is down, till it will not get recovered.


(Christian Dahlqvist) #4

Add one replica for all indices. This means you will have a copy even with one node down.


(Ankit Chelawat) #5

Replicas are hurting our performance, as the same documents will get indexed twice. So we don't want replicas to be present. Replica also calls for more memory and hardware.
So can we achieve the same without replica.


(Christian Dahlqvist) #6

No, that is unfortunately the price to pay for high availability.


(Ankit Chelawat) #7

I got it.

Actually in our case we do not require High availability, We only require to scale the index by increasing shards. As by increasing shards and having shards on different machines, we can increase our indexing and searching power.


(Ankit Chelawat) #8

Thanks Christian, For your quick support. It help us to design our ES Cluster.


(system) #9

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.