# Scaling ElasticSearch for many indexes

**URL:** <https://discuss.elastic.co/t/scaling-elasticsearch-for-many-indexes/369212>\
**Category:** Elasticsearch\
**Created:** [October 22, 2024, 11:31am UTC](https://discuss.elastic.co/t/scaling-elasticsearch-for-many-indexes/369212 "2024-10-22T11:31:23Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [October 22, 2024, 11:47am UTC](https://discuss.elastic.co/t/scaling-elasticsearch-for-many-indexes/369212/2 "2024-10-22T11:47:12Z")

</div>

Elasticsearch in my experience scales badly with large number of small indices like you get when you have indices per user. This has been improved in recent versions, but there is still a reason the default limit is there.

This has been asked a number of times over the years (most of the refrences I could find are a bit old) and I believe the recommendation still is to avoid trying to scale this way. If this in any way has changed I am sure someone will chime in and correct me.

> [@Effective separation of tenant data in latest release of ElasticSearch](https://discuss.elastic.co/t/effective-separation-of-tenant-data-in-latest-release-of-elasticsearch/156573):
>
> Hi All, We want to use ElasticSearch as a multi-tenant store , each tenant would have different requirement for document type/schema. What is the best way to store data wrt cost, manageability in this regard ? 1\> Each tenant having separate index with varying document types may not be efficient? 2\> A set of tenants may fall into one index with varying document types but With ElasticSearch's removal of mapping types mentioned in [link](https://www.elastic.co/guide/en/elasticsearch/reference/6.x/removal-of-types.html) It seems to be possible only through have custom type as…

> [@Sizing and configuration for multi-tenant application](https://discuss.elastic.co/t/sizing-and-configuration-for-multi-tenant-application/169620):
>
> Hi, I've been using ES in production for a long time for our application, but it is currently single tenant, and so I have dedicated ES instances running for each client. We are moving towards a multi-tenant platform and I just want to make sure I'm approaching this well from a hardware/config perspective. Currently, I'm storing a total of roughly 7TB of data across all these tenants. The plan is to move this all into a multi-tenant system. This could all be in one huge cluster, or we could se…

> [@JanGoAutonomous](#):
>
> How can I change my application to support that each user has its own "search" index?

Assuming the indices are small I would start by setting the number of primary shards to 1. That will reduce the shard count by 50%.

The best way forward after that depends a bit on how many users you will need to support and the use case in terms of mappings and queries/aggregations used. Another aspect is whether users have direct access to Elasticsearch or not. If you can provide some additional deatils on this we may be able to provide some suggestions.

---

_[View the full topic](https://discuss.elastic.co/t/scaling-elasticsearch-for-many-indexes/369212)._
