# Is there limitation how many indices could I create in ES cluster? and performance?

**URL:** <https://discuss.elastic.co/t/is-there-limitation-how-many-indices-could-i-create-in-es-cluster-and-performance/22669>\
**Category:** Elasticsearch\
**Created:** [March 14, 2015, 9:46am UTC](https://discuss.elastic.co/t/is-there-limitation-how-many-indices-could-i-create-in-es-cluster-and-performance/22669 "2015-03-14T09:46:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zehong\_yin](https://avatars.discourse-cdn.com/v4/letter/z/b3f665/32.png) [@zehong\_yin](https://discuss.elastic.co/u/zehong_yin)\
**Post date:** [March 14, 2015, 9:46am UTC](https://discuss.elastic.co/t/is-there-limitation-how-many-indices-could-i-create-in-es-cluster-and-performance/22669/1 "2015-03-14T09:46:11Z")

</div>

Hi, all

Is there limitation how many indices could I create in ES cluster? and Does  
the number of indices affect performance?  
I have used DATE as indice for logs from MMO game servers. That give me  
chance to remove old data.

But right now, I'm considering use userid as indice, that means there might  
be milliion users, as well as million indices created.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b2f0d724-f1b1-40b4-8457-318a195ebdd7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b2f0d724-f1b1-40b4-8457-318a195ebdd7%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [March 14, 2015, 10:29am UTC](https://discuss.elastic.co/t/is-there-limitation-how-many-indices-could-i-create-in-es-cluster-and-performance/22669/2 "2015-03-14T10:29:07Z")

</div>

Each index comes with a cost and probably having million of indices will require a lot of machines.  
Also the cluster state will be a way too big so it could affect cluster stability.

You will probably have at the end of the day a lot of small indices.

I mean: don't do this! 🙂

Share indices between users but use routing to make sure all docs for a given user go to the same shard.

Having rolling indices is a good idea though.

Here are my first thoughts about this.  
Hope this helps.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 14 mars 2015 à 02:46, zehong yin [timesking@gmail.com](mailto:timesking@gmail.com) a écrit :
> 
> Hi, all
> 
> Is there limitation how many indices could I create in ES cluster? and Does the number of indices affect performance?  
> I have used DATE as indice for logs from MMO game servers. That give me chance to remove old data.
> 
> But right now, I'm considering use userid as indice, that means there might be milliion users, as well as million indices created.
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b2f0d724-f1b1-40b4-8457-318a195ebdd7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b2f0d724-f1b1-40b4-8457-318a195ebdd7%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/BEB80606-4151-4308-B32C-556906E302E3%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/BEB80606-4151-4308-B32C-556906E302E3%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [March 14, 2015, 10:38am UTC](https://discuss.elastic.co/t/is-there-limitation-how-many-indices-could-i-create-in-es-cluster-and-performance/22669/3 "2015-03-14T10:38:27Z")

</div>

You may use a single index with enough shards for users and use routing for  
accessing the shard where a user ID has the docs indexed. See also shard  
overallocation

> **[Shard Overallocation | Elasticsearch: The Definitive Guide \[2.x\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/guide/current/overallocation.html)**

and  
[https://groups.google.com/forum/#!msg/elasticsearch/49q-\_AgQCp8/MRol0t9asEcJ](https://groups.google.com/forum/#!msg/elasticsearch/49q-_AgQCp8/MRol0t9asEcJ)

Jörg

On Sat, Mar 14, 2015 at 10:46 AM, zehong yin [timesking@gmail.com](mailto:timesking@gmail.com) wrote:

> Hi, all
> 
> Is there limitation how many indices could I create in ES cluster? and  
> Does the number of indices affect performance?  
> I have used DATE as indice for logs from MMO game servers. That give me  
> chance to remove old data.
> 
> But right now, I'm considering use userid as indice, that means there  
> might be milliion users, as well as million indices created.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/b2f0d724-f1b1-40b4-8457-318a195ebdd7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b2f0d724-f1b1-40b4-8457-318a195ebdd7%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/b2f0d724-f1b1-40b4-8457-318a195ebdd7%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b2f0d724-f1b1-40b4-8457-318a195ebdd7%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGN5ugQWN%3DW\_Fs19\_tsiGxw4uhwE\_3Ye30\_eCGFWJ%2BY9A%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGN5ugQWN%3DW_Fs19_tsiGxw4uhwE_3Ye30_eCGFWJ%2BY9A%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:26am UTC](https://discuss.elastic.co/t/is-there-limitation-how-many-indices-could-i-create-in-es-cluster-and-performance/22669/4 "2017-07-06T00:26:44Z")

</div>


