# How many number of aliases should be created on single index?

**URL:** <https://discuss.elastic.co/t/how-many-number-of-aliases-should-be-created-on-single-index/310868>\
**Category:** Elasticsearch\
**Created:** [July 28, 2022, 1:28pm UTC](https://discuss.elastic.co/t/how-many-number-of-aliases-should-be-created-on-single-index/310868 "2022-07-28T13:28:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vaibhav\_Tandale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vaibhav_tandale/32/100515_2.png) [@Vaibhav\_Tandale](https://discuss.elastic.co/u/Vaibhav_Tandale)\
**Post date:** [July 28, 2022, 1:28pm UTC](https://discuss.elastic.co/t/how-many-number-of-aliases-should-be-created-on-single-index/310868/1 "2022-07-28T13:28:36Z")

</div>

how many number of aliases should be created on single index? is there any hard limit for number of aliases on index/cluster?

---

<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 28, 2022, 1:33pm UTC](https://discuss.elastic.co/t/how-many-number-of-aliases-should-be-created-on-single-index/310868/2 "2022-07-28T13:33:34Z")

</div>

It sounds like you are considering abusing the alias functionality. What are you looking to do and what problem are you looking to solve? Information about aliases need to be stored in the cluster state which can make it large and slow. I have seen users end up in trouble due to too many aliases but do not have any idea of how many is too many.

---

<div class="post-metadata">

**Author:** ![Vaibhav\_Tandale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vaibhav_tandale/32/100515_2.png) [@Vaibhav\_Tandale](https://discuss.elastic.co/u/Vaibhav_Tandale)\
**Post date:** [July 28, 2022, 1:49pm UTC](https://discuss.elastic.co/t/how-many-number-of-aliases-should-be-created-on-single-index/310868/3 "2022-07-28T13:49:21Z")

</div>

have multi-tenant use case. need to store the all the tenants record in single index & filter out record base on alias name

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [July 28, 2022, 2:10pm UTC](https://discuss.elastic.co/t/how-many-number-of-aliases-should-be-created-on-single-index/310868/4 "2022-07-28T14:10:58Z")

</div>

How would you filter based on alias? Acessing an index using its alias is no different from acessing using the index 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 28, 2022, 2:23pm UTC](https://discuss.elastic.co/t/how-many-number-of-aliases-should-be-created-on-single-index/310868/5 "2022-07-28T14:23:55Z")

</div>

How many tenants do you expect to need to support? How many indices would each tenant have access to?

---

<div class="post-metadata">

**Author:** ![Vaibhav\_Tandale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vaibhav_tandale/32/100515_2.png) [@Vaibhav\_Tandale](https://discuss.elastic.co/u/Vaibhav_Tandale)\
**Post date:** [July 28, 2022, 2:30pm UTC](https://discuss.elastic.co/t/how-many-number-of-aliases-should-be-created-on-single-index/310868/6 "2022-07-28T14:30:36Z")

</div>

```auto
POST /_aliases?pretty
{
 "actions": [
   {
     "add": {
    
       "alias": "opster-alias",
       "filter": {
         "term": {
           "tenant": "opster"
         }
       }
     }
   }
 ]
}

```

have filter based on alias with tenant, because of that will manage the segregation between tenant data.

---

<div class="post-metadata">

**Author:** ![Vaibhav\_Tandale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vaibhav_tandale/32/100515_2.png) [@Vaibhav\_Tandale](https://discuss.elastic.co/u/Vaibhav_Tandale)\
**Post date:** [July 28, 2022, 2:41pm UTC](https://discuss.elastic.co/t/how-many-number-of-aliases-should-be-created-on-single-index/310868/7 "2022-07-28T14:41:06Z")

</div>

I havn't exact count of tenant, the tenant count is not fix,  
due to that I require count of the aliases should be on single index

---

<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 28, 2022, 2:47pm UTC](https://discuss.elastic.co/t/how-many-number-of-aliases-should-be-created-on-single-index/310868/8 "2022-07-28T14:47:16Z")

</div>

There is no defined limit and this may have changed across versions. [This post](https://discuss.elastic.co/t/performance-of-many-index-aliases/182529) discusses the issue and provided some guideline but is old and may be out of date.

---

<div class="post-metadata">

**Author:** ![Vaibhav\_Tandale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vaibhav_tandale/32/100515_2.png) [@Vaibhav\_Tandale](https://discuss.elastic.co/u/Vaibhav_Tandale)\
**Post date:** [July 29, 2022, 4:33am UTC](https://discuss.elastic.co/t/how-many-number-of-aliases-should-be-created-on-single-index/310868/9 "2022-07-29T04:33:07Z")

</div>

Thank you so much @leandrojmp @Christian_Dahlqvist.

---

<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 26, 2022, 4:33am UTC](https://discuss.elastic.co/t/how-many-number-of-aliases-should-be-created-on-single-index/310868/10 "2022-08-26T04:33:42Z")

</div>

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