# Is there capability to set size limitation by index for elasticsearch

**URL:** <https://discuss.elastic.co/t/is-there-capability-to-set-size-limitation-by-index-for-elasticsearch/128572>\
**Category:** Elasticsearch\
**Created:** [April 18, 2018, 3:56pm UTC](https://discuss.elastic.co/t/is-there-capability-to-set-size-limitation-by-index-for-elasticsearch/128572 "2018-04-18T15:56:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![lauea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lauea/32/26743_2.png) [@lauea](https://discuss.elastic.co/u/lauea)\
**Post date:** [April 18, 2018, 3:56pm UTC](https://discuss.elastic.co/t/is-there-capability-to-set-size-limitation-by-index-for-elasticsearch/128572/1 "2018-04-18T15:56:15Z")

</div>

Hi guys,

Here has a scenario like below:

There are many indexes with different name in my es cluster. Then total es data disk size is 1TB. And in order to avoid some indexes size huge extremely and impact all index indexing,

> Q1: if es can set different size limitation for different indexes?  
> Q2: if Q1 is yes, if es can auto housekeep in time when almost reach the index size limiataion?

We have centralized all log type to one big es cluster with different index. Above is our bottleneck to go forward. Looking forward to your advise. Thanks.

Regards/Eason

---

<div class="post-metadata">

**Author:** ![dakrone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dakrone/32/23351_2.png) [@dakrone](https://discuss.elastic.co/u/dakrone)\
**Post date:** [April 18, 2018, 4:46pm UTC](https://discuss.elastic.co/t/is-there-capability-to-set-size-limitation-by-index-for-elasticsearch/128572/2 "2018-04-18T16:46:34Z")

</div>

I would recommend that you check out the Rollover API, which will allow you to roll over an index based on a criteria:

[https://www.elastic.co/guide/en/elasticsearch/reference/6.2/indices-rollover-index.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/indices-rollover-index.html)

---

<div class="post-metadata">

**Author:** ![lauea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lauea/32/26743_2.png) [@lauea](https://discuss.elastic.co/u/lauea)\
**Post date:** [April 18, 2018, 4:59pm UTC](https://discuss.elastic.co/t/is-there-capability-to-set-size-limitation-by-index-for-elasticsearch/128572/3 "2018-04-18T16:59:46Z")

</div>

@dakrone, per review your suggestion, seems it only supports to carry out action when you run post request.

Let's suppose below scenario, now post one request to rollover, and it will rollover after 5 mins. Within this 5 mins, it reaches the threshold and could not insert anymore before next rollover reaches, which still have risk and press to the disk size usage. If es has auto/real time trigger the rollover action?

---

<div class="post-metadata">

**Author:** ![dakrone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dakrone/32/23351_2.png) [@dakrone](https://discuss.elastic.co/u/dakrone)\
**Post date:** [April 18, 2018, 5:20pm UTC](https://discuss.elastic.co/t/is-there-capability-to-set-size-limitation-by-index-for-elasticsearch/128572/4 "2018-04-18T17:20:42Z")

</div>

> [@lauea](#):
>
> If es has auto/real time trigger the rollover action?

Not currently, though it is something we are investigating for the future. For now though, you could set up a cron job that called the \_rollover API every 2 (or however many) minutes, then your client only has to use the alias and not worry about when the index is rolled over.

---

<div class="post-metadata">

**Author:** ![lauea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lauea/32/26743_2.png) [@lauea](https://discuss.elastic.co/u/lauea)\
**Post date:** [April 18, 2018, 5:25pm UTC](https://discuss.elastic.co/t/is-there-capability-to-set-size-limitation-by-index-for-elasticsearch/128572/5 "2018-04-18T17:25:26Z")

</div>

@dakrone, Hope we can find it at change log of future release. Thanks for your suggestion.

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [April 18, 2018, 9:17pm UTC](https://discuss.elastic.co/t/is-there-capability-to-set-size-limitation-by-index-for-elasticsearch/128572/6 "2018-04-18T21:17:13Z")

</div>

@lauea Until Elasticsearch gets this automated, you can automate it with [Elasticsearch Curator](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.5/rollover.html).

---

<div class="post-metadata">

**Author:** ![lauea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lauea/32/26743_2.png) [@lauea](https://discuss.elastic.co/u/lauea)\
**Post date:** [April 19, 2018, 4:44am UTC](https://discuss.elastic.co/t/is-there-capability-to-set-size-limitation-by-index-for-elasticsearch/128572/7 "2018-04-19T04:44:12Z")

</div>

@theuntergeek, I wanna es auto trigger the action when threshold reached. For curator, only can we run it by scheduler, which do not know real time es index size. Actually, we also put ES Curator in our eco system.

Anyway, let's look forward to the future release.

---

<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:** [May 17, 2018, 4:44am UTC](https://discuss.elastic.co/t/is-there-capability-to-set-size-limitation-by-index-for-elasticsearch/128572/8 "2018-05-17T04:44:14Z")

</div>

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