# Single Shard 0 replicas 3 nodes

**URL:** <https://discuss.elastic.co/t/single-shard-0-replicas-3-nodes/145184>\
**Category:** Elasticsearch\
**Created:** [August 20, 2018, 2:12pm UTC](https://discuss.elastic.co/t/single-shard-0-replicas-3-nodes/145184 "2018-08-20T14:12:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanjaykrishna12](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@sanjaykrishna12](https://discuss.elastic.co/u/sanjaykrishna12)\
**Post date:** [August 20, 2018, 2:12pm UTC](https://discuss.elastic.co/t/single-shard-0-replicas-3-nodes/145184/1 "2018-08-20T14:12:25Z")

</div>

Hi,

I am trying to understand the shards and replicas in elasticsearch. I have 3 nodes in my elastic cluster. My indices are created with 1 shard and 0 replicas. I assume in this scenario each of my node would have 1 copy of the index ? if I create 3 shards and 2 replicas per index, I understand each node will have 1 primary shard and 2 replica shards of the other nodes which I believe is same as the first scenario where I have single shard with no replicas (in both the scenarios each node will have complete index) . Am I right in my assumption ? if yes, which approach is better for a cluster with 3 nodes ? single shard with 0 replicas or 3 shards with 2 replicas ?

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [August 22, 2018, 12:32pm UTC](https://discuss.elastic.co/t/single-shard-0-replicas-3-nodes/145184/2 "2018-08-22T12:32:37Z")

</div>

The `number_of_shards` defines the number of primary shards and the `number_of_replicas` is a replication factor of the primary shards.

The formula to define the total count of shards of `number_of_shards * (1 + number_of_replicas)`

So, in your example, if you define 1 shard and 0 replicas, then you will have 1 shard only for this index, and not 3, regardless of how many nodes your cluster have.

If you define 3 shards and 2 replicas, then this index will have 9 shards in which 3 are primaries and the other 6 are replicas.

There is a diagram here [https://www.elastic.co/guide/en/elasticsearch/guide/current/replica-shards.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/replica-shards.html) that explains this better.

---

<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:** [September 19, 2018, 12:32pm UTC](https://discuss.elastic.co/t/single-shard-0-replicas-3-nodes/145184/3 "2018-09-19T12:32:43Z")

</div>

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