# How many indices can be created

**URL:** <https://discuss.elastic.co/t/how-many-indices-can-be-created/140226>\
**Category:** Elasticsearch\
**Created:** [July 16, 2018, 10:53pm UTC](https://discuss.elastic.co/t/how-many-indices-can-be-created/140226 "2018-07-16T22:53:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pierre\_Abreu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierre_abreu/32/33396_2.png) [@Pierre\_Abreu](https://discuss.elastic.co/u/Pierre_Abreu)\
**Post date:** [July 16, 2018, 10:53pm UTC](https://discuss.elastic.co/t/how-many-indices-can-be-created/140226/1 "2018-07-16T22:53:42Z")

</div>

HI, my ES data can grow up to 270,000 indexes. I'm creating one index per user. Is there a ES limit to create indexes? Each index has one shard and one replica only. My cluster have 3 master nodes and 2 data nodes

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 16, 2018, 11:31pm UTC](https://discuss.elastic.co/t/how-many-indices-can-be-created/140226/2 "2018-07-16T23:31:22Z")

</div>

We recommend no more than 600 shards per node.

Why do you need one per user? What sort of data is it?

---

<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 17, 2018, 7:37am UTC](https://discuss.elastic.co/t/how-many-indices-can-be-created/140226/3 "2018-07-17T07:37:09Z")

</div>

Elasticsearch does not impose any strict limit to the number of indices or shards, but that does not mean that there are not practical limits. Having an index per user adds a lot of flexibility and isolation, but unfortunately does not scale well at all. The mappings of each index together with information about the location of the shards need to be kept in the cluster state, which grows quickly the more indices and shards you add. As it grows changes to the cluster state, e.g. shard relocations and mapping changes, will take longer and longer to apply, until the cluster no longer works very well.

---

<div class="post-metadata">

**Author:** ![Pierre\_Abreu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierre_abreu/32/33396_2.png) [@Pierre\_Abreu](https://discuss.elastic.co/u/Pierre_Abreu)\
**Post date:** [July 17, 2018, 5:29pm UTC](https://discuss.elastic.co/t/how-many-indices-can-be-created/140226/4 "2018-07-17T17:29:18Z")

</div>

Hi Mark.  
My document type is a question list. My user is a student. Each student has many questions list. Until the end of the year, the user is expected to have 4,000 questions list.

Another strategy that I've think is create one single index and 10 shards using \_routing field to index document ( [https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-routing-field.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-routing-field.html) ). What you think?

---

<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 17, 2018, 5:42pm UTC](https://discuss.elastic.co/t/how-many-indices-can-be-created/140226/5 "2018-07-17T17:42:20Z")

</div>

How much data do you have in total?

---

<div class="post-metadata">

**Author:** ![Pierre\_Abreu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierre_abreu/32/33396_2.png) [@Pierre\_Abreu](https://discuss.elastic.co/u/Pierre_Abreu)\
**Post date:** [July 17, 2018, 6:50pm UTC](https://discuss.elastic.co/t/how-many-indices-can-be-created/140226/6 "2018-07-17T18:50:42Z")

</div>

Now I have 82,000,000 of documents (20Gb). I expect to double it until december

---

<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 17, 2018, 6:59pm UTC](https://discuss.elastic.co/t/how-many-indices-can-be-created/140226/7 "2018-07-17T18:59:16Z")

</div>

That easily fits in a single index. If you pick 5-10 primary shards you will probably be fine for the foreseeable future.

---

<div class="post-metadata">

**Author:** ![Pierre\_Abreu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierre_abreu/32/33396_2.png) [@Pierre\_Abreu](https://discuss.elastic.co/u/Pierre_Abreu)\
**Post date:** [July 17, 2018, 7:58pm UTC](https://discuss.elastic.co/t/how-many-indices-can-be-created/140226/8 "2018-07-17T19:58:38Z")

</div>

thanks a lot

---

<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 14, 2018, 7:58pm UTC](https://discuss.elastic.co/t/how-many-indices-can-be-created/140226/9 "2018-08-14T19:58:50Z")

</div>

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