# How to keep 3 numbers for all shards？

**URL:** https://discuss.elastic.co/t/how-to-keep-3-numbers-for-all-shards/295125
**Category:** Elasticsearch
**Created:** [January 23, 2022, 3:09am UTC](https://discuss.elastic.co/t/how-to-keep-3-numbers-for-all-shards/295125 "2022-01-23T03:09:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)
#### Post date: [January 23, 2022, 3:09am UTC](https://discuss.elastic.co/t/how-to-keep-3-numbers-for-all-shards/295125/1 "2022-01-23T03:09:49Z")

</div>

I have three nodes, and I want to maintain 3 primary shards and 1 replica for each index on the cluster. I know that I can specify a template by setting a template and logstash output, but is there a way to do it once and for all?

---

<div class="post-metadata">

### Author: ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)
#### Post date: [January 23, 2022, 3:26am UTC](https://discuss.elastic.co/t/how-to-keep-3-numbers-for-all-shards/295125/2 "2022-01-23T03:26:01Z")

</div>

I suppose [index templates](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-templates.html) is a good choice.

---

<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: [February 20, 2022, 3:26am UTC](https://discuss.elastic.co/t/how-to-keep-3-numbers-for-all-shards/295125/3 "2022-02-20T03:26:53Z")

</div>

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