# As best practice as there any limit on number of indices in elastic search

**URL:** <https://discuss.elastic.co/t/as-best-practice-as-there-any-limit-on-number-of-indices-in-elastic-search/278049>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-monitoring\
**Created:** [July 7, 2021, 9:20am UTC](https://discuss.elastic.co/t/as-best-practice-as-there-any-limit-on-number-of-indices-in-elastic-search/278049 "2021-07-07T09:20:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mba](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@mba](https://discuss.elastic.co/u/mba)\
**Post date:** [July 7, 2021, 9:20am UTC](https://discuss.elastic.co/t/as-best-practice-as-there-any-limit-on-number-of-indices-in-elastic-search/278049/1 "2021-07-07T09:20:31Z")

</div>

I want to do logging of 100+ microservices. So is it good practice to have separate index for every microservice (index=MS name) ??

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 7, 2021, 11:28am UTC](https://discuss.elastic.co/t/as-best-practice-as-there-any-limit-on-number-of-indices-in-elastic-search/278049/2 "2021-07-07T11:28:13Z")

</div>

> [@mba](#):
>
> I want to do logging of 100+ microservices. So is it good practice to have separate index for every microservice (index=MS name) ??

No, generally it is not. Each index consists of one or more shards and having lots of small shards is very inefficient and wastes resources. Please read [this blog post](https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster) for more details.

Unless you have conflicting mappings I would recommend microservices to share indices, possible based on retention requirements so you actieve a reasonably large aversage shard size.

---

<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 4, 2021, 11:28am UTC](https://discuss.elastic.co/t/as-best-practice-as-there-any-limit-on-number-of-indices-in-elastic-search/278049/3 "2021-08-04T11:28:38Z")

</div>

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