# Creating alias too slow

**URL:** <https://discuss.elastic.co/t/creating-alias-too-slow/81464>\
**Category:** Elasticsearch\
**Created:** [April 6, 2017, 12:39pm UTC](https://discuss.elastic.co/t/creating-alias-too-slow/81464 "2017-04-06T12:39:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felipe\_Santos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felipe_santos/32/3511_2.png) [@Felipe\_Santos](https://discuss.elastic.co/u/Felipe_Santos)\
**Post date:** [April 6, 2017, 12:39pm UTC](https://discuss.elastic.co/t/creating-alias-too-slow/81464/1 "2017-04-06T12:39:33Z")

</div>

I have a job which run every day, this job creates indexes and alias. But now the creation is too slow.

If I have a lot of alias it could increase the cluster state? What is a big cluster state?  
The search and index are normal.

---

<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:** [April 6, 2017, 1:04pm UTC](https://discuss.elastic.co/t/creating-alias-too-slow/81464/2 "2017-04-06T13:04:49Z")

</div>

Aliases are stored in the cluster state, and will therefore affect its size. As updates to the cluster state as far as I know are single-threaded, they are likely to slow down with increased size.

---

<div class="post-metadata">

**Author:** ![Felipe\_Santos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felipe_santos/32/3511_2.png) [@Felipe\_Santos](https://discuss.elastic.co/u/Felipe_Santos)\
**Post date:** [April 6, 2017, 1:10pm UTC](https://discuss.elastic.co/t/creating-alias-too-slow/81464/3 "2017-04-06T13:10:04Z")

</div>

I use elasticsearch 1.7, as far as I know it always send all the cluster state every update.

Is there any way to improve it?  
I really need this alias

---

<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:** [April 6, 2017, 1:12pm UTC](https://discuss.elastic.co/t/creating-alias-too-slow/81464/4 "2017-04-06T13:12:32Z")

</div>

You are correct in that the fact that Elasticsearch prior to 2.x sends the full cluster state for each change makes it worse. As far as I know there is no good way to improve it apart from shrinking the size of the cluster state and/or upgrading to a newer version.

---

<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 4, 2017, 1:12pm UTC](https://discuss.elastic.co/t/creating-alias-too-slow/81464/5 "2017-05-04T13:12:40Z")

</div>

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