# Data storage - Shard and replica size

**URL:** <https://discuss.elastic.co/t/data-storage-shard-and-replica-size/282816>\
**Category:** Elasticsearch\
**Created:** [August 30, 2021, 1:17pm UTC](https://discuss.elastic.co/t/data-storage-shard-and-replica-size/282816 "2021-08-30T13:17:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![prithvirajsivarajan](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@prithvirajsivarajan](https://discuss.elastic.co/u/prithvirajsivarajan)\
**Post date:** [August 30, 2021, 1:17pm UTC](https://discuss.elastic.co/t/data-storage-shard-and-replica-size/282816/1 "2021-08-30T13:17:08Z")

</div>

I have a two node cluster with 600gb space between them on the data path. I'm setting a data stream where each index has 2 shards and one replica. Does the replica take same space as the main shards? Should I setup my data stream with this 600GB in mind or should I have to consider replica size also? If so, will replica take the same amount of space as main shard?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [August 30, 2021, 1:32pm UTC](https://discuss.elastic.co/t/data-storage-shard-and-replica-size/282816/2 "2021-08-30T13:32:38Z")

</div>

Yes, replica takes the same space as the primaries, you should always take it in consideration.

You should also take the [watermark levels](https://www.elastic.co/guide/en/elasticsearch/reference/7.14/modules-cluster.html#disk-based-shard-allocation) in consideration.

But one other thing is, if you have a 2 node cluster, you do not have a fault tolerant cluster as you cannot afford to lose the master node, so it does not make much sense to have replicas in this case.

---

<div class="post-metadata">

**Author:** ![prithvirajsivarajan](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@prithvirajsivarajan](https://discuss.elastic.co/u/prithvirajsivarajan)\
**Post date:** [August 30, 2021, 1:34pm UTC](https://discuss.elastic.co/t/data-storage-shard-and-replica-size/282816/3 "2021-08-30T13:34:27Z")

</div>

Actually I have a voting only master node also setup. But thanks for pointing that out.

---

<div class="post-metadata">

**Author:** ![prithvirajsivarajan](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@prithvirajsivarajan](https://discuss.elastic.co/u/prithvirajsivarajan)\
**Post date:** [August 30, 2021, 1:42pm UTC](https://discuss.elastic.co/t/data-storage-shard-and-replica-size/282816/4 "2021-08-30T13:42:24Z")

</div>

And one more thing Leandro. since I'm using data streams, will it reduce the size of the data in cold or warm phases? If yes, how much size will it reduce?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [August 30, 2021, 1:55pm UTC](https://discuss.elastic.co/t/data-storage-shard-and-replica-size/282816/5 "2021-08-30T13:55:22Z")

</div>

I do not use data streams, but if you are using the ILM, you can apply a force merge and compress the stored fields selecting the option.

Just keep in mind that the force merge could be resource intensive and the compression will also gives you a slower performance.

---

<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 27, 2021, 1:56pm UTC](https://discuss.elastic.co/t/data-storage-shard-and-replica-size/282816/6 "2021-09-27T13:56:10Z")

</div>

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