# How to Best define the shards and replica in Elasticsearch

**URL:** https://discuss.elastic.co/t/how-to-best-define-the-shards-and-replica-in-elasticsearch/188555
**Category:** Elasticsearch
**Created:** [July 2, 2019, 4:29pm UTC](https://discuss.elastic.co/t/how-to-best-define-the-shards-and-replica-in-elasticsearch/188555 "2019-07-02T16:29:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Karn\_Gusain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karn_gusain/32/47419_2.png) [@Karn\_Gusain](https://discuss.elastic.co/u/Karn_Gusain)
#### Post date: [July 2, 2019, 4:29pm UTC](https://discuss.elastic.co/t/how-to-best-define-the-shards-and-replica-in-elasticsearch/188555/1 "2019-07-02T16:29:09Z")

</div>

Hello ELK Experts,

I would like to seek your expert opinion for my use case where i have 3 node ELK cluster setup and each not is also serving as a data node.

Below is my `elasticsearch.yml` file.

```
# cat /etc/elasticsearch/elasticsearch.yml
# Elasticsearch config
#########################
cluster.name: log-cohort
node.name: xprdc01
#node.master: true
path:
    data: /data/lib/elasticsearch
    logs: /var/log/elasticsearch
network.host: 0.0.0.0
http.port: 9200
discovery.zen.ping.unicast.hosts: ["xprdc01", "xprdc02", "xprdc03"]
xpack.security.enabled: false
#bootstrap.mlockall: true
#######################################################
cluster.routing.allocation.disk.threshold_enabled: true
cluster.routing.allocation.disk.watermark.low: 93%
cluster.routing.allocation.disk.watermark.high: 95%

```

Below is Just a screen shot of the details of indices, shards and documents and data size.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/6/563ab33f27950ca11e0959c1b00c32d4d078bf6b.png)

---

<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 2, 2019, 4:48pm UTC](https://discuss.elastic.co/t/how-to-best-define-the-shards-and-replica-in-elasticsearch/188555/2 "2019-07-02T16:48:35Z")

</div>

You probably have too many shards per node.

May I suggest you look at the following resources about sizing:

[https://www.elastic.co/elasticon/conf/2016/sf/quantitative-cluster-sizing](https://www.elastic.co/elasticon/conf/2016/sf/quantitative-cluster-sizing)

> **[How many shards should I have in my Elasticsearch cluster?](https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster)**
>
> If you are looking for practical guidelines around how many indices and shards to have in your cluster, this blog post will help you avoid common pitfalls.

https://www.slideshare.net/slideshow/embed_code/key/vR0XKDq4TGa77z

And [https://www.elastic.co/webinars/using-rally-to-get-your-elasticsearch-cluster-size-right](https://www.elastic.co/webinars/using-rally-to-get-your-elasticsearch-cluster-size-right)

---

<div class="post-metadata">

### Author: ![Karn\_Gusain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karn_gusain/32/47419_2.png) [@Karn\_Gusain](https://discuss.elastic.co/u/Karn_Gusain)
#### Post date: [July 2, 2019, 5:18pm UTC](https://discuss.elastic.co/t/how-to-best-define-the-shards-and-replica-in-elasticsearch/188555/3 "2019-07-02T17:18:40Z")

</div>

Thank you so much, appreciate your help, i'll go through these videos.

---

<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: [July 30, 2019, 5:18pm UTC](https://discuss.elastic.co/t/how-to-best-define-the-shards-and-replica-in-elasticsearch/188555/4 "2019-07-30T17:18:44Z")

</div>

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