# Shards of an index present only in one node in a multinode cluster

**URL:** https://discuss.elastic.co/t/shards-of-an-index-present-only-in-one-node-in-a-multinode-cluster/284805
**Category:** Elasticsearch
**Created:** [September 22, 2021, 6:17am UTC](https://discuss.elastic.co/t/shards-of-an-index-present-only-in-one-node-in-a-multinode-cluster/284805 "2021-09-22T06:17:33Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Srinivas1602](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Srinivas1602](https://discuss.elastic.co/u/Srinivas1602)
#### Post date: [September 22, 2021, 6:17am UTC](https://discuss.elastic.co/t/shards-of-an-index-present-only-in-one-node-in-a-multinode-cluster/284805/1 "2021-09-22T06:17:33Z")

</div>

Hi,

I have a multinode Elasticsearch setup with one master node and two data nodes. I created an index with number of shards as 2 and number of replicas as 1 and inserted the data in the index.  
However I see that both the shards are present in one node and the replicas in the other node as seen below

```auto
GET /_cat/shards

enodeb 1 p STARTED 937826 125.4mb Y.YY.Y.72 data-1
enodeb 1 r STARTED 937826 124.1mb X.XX.X.73 data-2
enodeb 0 p STARTED 937263 124.7mb Y.YY.Y.72 data-1
enodeb 0 r STARTED 937263 126.2mb X.XX.X.73 data-2

```

 ![shards-replica-kibana](https://us1.discourse-cdn.com/elastic/original/3X/6/e/6ec52de799d5c68109a5c5730254580830effab1.png)

I was of the assumption that shard 0 would be in one node and shard 1 would be in the other node with each replica on the other nodes. Am I missing any configuration here, as in how to distribute the shards across these two nodes?

I would appreciate if anyone could assist me on this.

Thanks

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [September 22, 2021, 6:53am UTC](https://discuss.elastic.co/t/shards-of-an-index-present-only-in-one-node-in-a-multinode-cluster/284805/2 "2021-09-22T06:53:25Z")

</div>

Primary and replica shards hold the same data and are for most purposes equal. The primary can move over time in response to cluster events so what you are seeing is perfectly fine. You can not control on which node the primary resides.

---

<div class="post-metadata">

### Author: ![Srinivas1602](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Srinivas1602](https://discuss.elastic.co/u/Srinivas1602)
#### Post date: [September 22, 2021, 7:11am UTC](https://discuss.elastic.co/t/shards-of-an-index-present-only-in-one-node-in-a-multinode-cluster/284805/3 "2021-09-22T07:11:46Z")

</div>

Thanks @Christian_Dahlqvist ,

But If I have all the shards of an index in one node, and if there are multiple users querying that index, wont the entire load fall on the same node? i thought Elasticsearch would distribute the shards across multiple nodes by default and thereby distribute the load across the cluster.  
In my case I have 6 indices and all the respective shards are on the same datanode i.e data-1 with their replicas on the other node i.e data-2.  
I am sorry but I think I am missing some point here in my understanding.

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [September 22, 2021, 7:14am UTC](https://discuss.elastic.co/t/shards-of-an-index-present-only-in-one-node-in-a-multinode-cluster/284805/4 "2021-09-22T07:14:09Z")

</div>

The primary and replica shards are on different nodes and queries are distributed across both primary and replica shards so load is distributed.

---

<div class="post-metadata">

### Author: ![Srinivas1602](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Srinivas1602](https://discuss.elastic.co/u/Srinivas1602)
#### Post date: [September 22, 2021, 7:18am UTC](https://discuss.elastic.co/t/shards-of-an-index-present-only-in-one-node-in-a-multinode-cluster/284805/5 "2021-09-22T07:18:37Z")

</div>

Thanks for the help and clarification @Christian_Dahlqvist

---

<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: [October 20, 2021, 7:19am UTC](https://discuss.elastic.co/t/shards-of-an-index-present-only-in-one-node-in-a-multinode-cluster/284805/6 "2021-10-20T07:19:01Z")

</div>

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