# How long it takes to update an alias?

**URL:** <https://discuss.elastic.co/t/how-long-it-takes-to-update-an-alias/51715>\
**Category:** Elasticsearch\
**Created:** [June 2, 2016, 2:17pm UTC](https://discuss.elastic.co/t/how-long-it-takes-to-update-an-alias/51715 "2016-06-02T14:17:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![haizaar](https://avatars.discourse-cdn.com/v4/letter/h/3d9bf3/32.png) [@haizaar](https://discuss.elastic.co/u/haizaar)\
**Post date:** [June 2, 2016, 2:17pm UTC](https://discuss.elastic.co/t/how-long-it-takes-to-update-an-alias/51715/1 "2016-06-02T14:17:23Z")

</div>

I'm frequently (several times per second) updating alias on my ES 2.3.1 cluster. The index has 5 shards and the alias definition example is here: [http://pastebin.com/raw/vZriWFFS](http://pastebin.com/raw/vZriWFFS)

I notice that it takes 300-500 milliseconds for "PUT alias" operation to complete, which is rather long. Is this an expected behaviour? Is there a way to speed it up?

---

<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:** [June 2, 2016, 2:22pm UTC](https://discuss.elastic.co/t/how-long-it-takes-to-update-an-alias/51715/2 "2016-06-02T14:22:54Z")

</div>

Each change to an alias requires the cluster state to be updated and propagated across the cluster, so this type of frequent updates will cause a fair bit of overhead. It sounds like you are abusing aliases in a way they were not necessarily designed for. What is the problem you are trying to solve by using aliases in this way?

---

<div class="post-metadata">

**Author:** ![haizaar](https://avatars.discourse-cdn.com/v4/letter/h/3d9bf3/32.png) [@haizaar](https://discuss.elastic.co/u/haizaar)\
**Post date:** [June 2, 2016, 2:27pm UTC](https://discuss.elastic.co/t/how-long-it-takes-to-update-an-alias/51715/3 "2016-06-02T14:27:51Z")

</div>

We want certain set of documents to be visible only when we complete loading the whole set. So we do queries against aliases only and update aliases to mask-out/in `setid`s that are in progress.

---

<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 5, 2017, 10:46pm UTC](https://discuss.elastic.co/t/how-long-it-takes-to-update-an-alias/51715/4 "2017-07-05T22:46:51Z")

</div>


