# Number of shards

**URL:** https://discuss.elastic.co/t/number-of-shards/241802
**Category:** Elasticsearch
**Created:** [July 19, 2020, 3:02pm UTC](https://discuss.elastic.co/t/number-of-shards/241802 "2020-07-19T15:02:30Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![liorg2](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@liorg2](https://discuss.elastic.co/u/liorg2)
#### Post date: [July 19, 2020, 3:02pm UTC](https://discuss.elastic.co/t/number-of-shards/241802/1 "2020-07-19T15:02:30Z")

</div>

hello

I found this rule of thumb for 30-50gb per shared  
so, does it mean that if I have 100gb of data, I will need 2 primary shards, or 1 primary and 1 replica is good enough?

thanks!

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [July 19, 2020, 3:52pm UTC](https://discuss.elastic.co/t/number-of-shards/241802/2 "2020-07-19T15:52:16Z")

</div>

Between 2 to 5 primaries. Whatever the number of replicas.

---

<div class="post-metadata">

### Author: ![liorg2](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@liorg2](https://discuss.elastic.co/u/liorg2)
#### Post date: [July 20, 2020, 7:06am UTC](https://discuss.elastic.co/t/number-of-shards/241802/3 "2020-07-20T07:06:36Z")

</div>

thanks. so if I configure the rollover to 30gb with 1 primary shard, it should be the same right?

---

<div class="post-metadata">

### Author: ![Steve\_Mushero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_mushero/32/22441_2.png) [@Steve\_Mushero](https://discuss.elastic.co/u/Steve_Mushero)
#### Post date: [July 20, 2020, 8:00am UTC](https://discuss.elastic.co/t/number-of-shards/241802/4 "2020-07-20T08:00:37Z")

</div>

To be clear, it's per-primary shard size, as the replica is a duplicate of that, and doesn't matter. So if you have 40GB of data, 1-2 shards are good; if you have 80GB, then 2-3, etc. Then you add whatever replicas you want for reliability or performance (usually 1 for reliability, more if you have more nodes and want more performance, but all eats disk & RAM, of course).

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [July 20, 2020, 8:02am UTC](https://discuss.elastic.co/t/number-of-shards/241802/5 "2020-07-20T08:02:02Z")

</div>

Yes.

---

<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: [August 17, 2020, 9:11am UTC](https://discuss.elastic.co/t/number-of-shards/241802/7 "2020-08-17T09:11:20Z")

</div>

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