# Expected behavior for many concurrent create index requests

**URL:** <https://discuss.elastic.co/t/expected-behavior-for-many-concurrent-create-index-requests/178335>\
**Category:** Elasticsearch\
**Created:** [April 24, 2019, 9:57pm UTC](https://discuss.elastic.co/t/expected-behavior-for-many-concurrent-create-index-requests/178335 "2019-04-24T21:57:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![arvinds94](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@arvinds94](https://discuss.elastic.co/u/arvinds94)\
**Post date:** [April 24, 2019, 9:57pm UTC](https://discuss.elastic.co/t/expected-behavior-for-many-concurrent-create-index-requests/178335/1 "2019-04-24T21:57:20Z")

</div>

Pretty much as the question states. What is the expected behavior when many concurrent identical create index requests are made to the elasticsearch cluster?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 25, 2019, 1:19am UTC](https://discuss.elastic.co/t/expected-behavior-for-many-concurrent-create-index-requests/178335/2 "2019-04-25T01:19:51Z")

</div>

If you are using the same document id for all, the last request will overwrite all the previous ones.  
If you are not providing any id, you will have as many "duplicated" documents as the number of requests.

---

<div class="post-metadata">

**Author:** ![arvinds94](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@arvinds94](https://discuss.elastic.co/u/arvinds94)\
**Post date:** [April 25, 2019, 11:04pm UTC](https://discuss.elastic.co/t/expected-behavior-for-many-concurrent-create-index-requests/178335/3 "2019-04-25T23:04:36Z")

</div>

I was saying for creating an index not inserting a document. Is creating an index something that is only handled by certain nodes and/or threadsafe?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 26, 2019, 1:40am UTC](https://discuss.elastic.co/t/expected-behavior-for-many-concurrent-create-index-requests/178335/4 "2019-04-26T01:40:09Z")

</div>

Only the current master node processes that operation and decides where to allocate the shards and other things. Then it propagates the updated cluster state to all the other nodes.

---

<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 24, 2019, 1:40am UTC](https://discuss.elastic.co/t/expected-behavior-for-many-concurrent-create-index-requests/178335/5 "2019-05-24T01:40:12Z")

</div>

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