# Does elastic search give users capability to create custom thread pool?

**URL:** <https://discuss.elastic.co/t/does-elastic-search-give-users-capability-to-create-custom-thread-pool/185445>\
**Category:** Elasticsearch\
**Created:** [June 12, 2019, 2:38pm UTC](https://discuss.elastic.co/t/does-elastic-search-give-users-capability-to-create-custom-thread-pool/185445 "2019-06-12T14:38:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![NairitiSharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nairitisharma/32/68360_2.png) [@NairitiSharma](https://discuss.elastic.co/u/NairitiSharma)\
**Post date:** [June 12, 2019, 2:38pm UTC](https://discuss.elastic.co/t/does-elastic-search-give-users-capability-to-create-custom-thread-pool/185445/1 "2019-06-12T14:38:31Z")

</div>

Does elastic search give users capability to create custom thread pool? If its a yes for above question, how do we utilize the custom pool to serve specific set of APIs?

My requirement is to have separate thread pool for single ingest and bulk ingest APIs. Can I create a custom thread pool and divert all the bulk requests to it and let write thread pool serve single ingests?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [June 12, 2019, 3:15pm UTC](https://discuss.elastic.co/t/does-elastic-search-give-users-capability-to-create-custom-thread-pool/185445/2 "2019-06-12T15:15:40Z")

</div>

> [@NairitiSharma](#):
>
> Does Elasticsearch give users capability to create custom thread pool?

No, it doesn't.

> [@NairitiSharma](#):
>
> My requirement is to have separate thread pool for single ingest and bulk ingest APIs.

Elasticsearch used to do this, but combined the thread pools in 6.0.

---

<div class="post-metadata">

**Author:** ![NairitiSharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nairitisharma/32/68360_2.png) [@NairitiSharma](https://discuss.elastic.co/u/NairitiSharma)\
**Post date:** [June 12, 2019, 3:47pm UTC](https://discuss.elastic.co/t/does-elastic-search-give-users-capability-to-create-custom-thread-pool/185445/3 "2019-06-12T15:47:41Z")

</div>

We are using bulk api for upgrade and single ingest for regular load. The requirement is to let single ingests not get affected by any upgrade running (even on the weekends). Since we cannot control the upgrades, bulk ingests are eating up all the write threads and even the queue is full. Is there any option available to distribute number of threads for bulk, and everything else? We are considering client throttling for bulk as on option too.

Env has 3 ES nodes. Each write thread pool is set to 32 threads and the default queue of 200.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [June 12, 2019, 4:07pm UTC](https://discuss.elastic.co/t/does-elastic-search-give-users-capability-to-create-custom-thread-pool/185445/4 "2019-06-12T16:07:45Z")

</div>

> [@NairitiSharma](#):
>
> We are considering client throttling for bulk as on option too.

Yes, that sounds like the best way to implement the kind of traffic shaping you need.

---

<div class="post-metadata">

**Author:** ![NairitiSharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nairitisharma/32/68360_2.png) [@NairitiSharma](https://discuss.elastic.co/u/NairitiSharma)\
**Post date:** [June 12, 2019, 5:16pm UTC](https://discuss.elastic.co/t/does-elastic-search-give-users-capability-to-create-custom-thread-pool/185445/5 "2019-06-12T17:16:48Z")

</div>

How does bulk API utilize active threads of write thread pool? I have an index with 1 shard and 1 replica. When I push , say 100 documents, using bulk API to this index, will it employ 1 thread of write thread pool to do the ingests?

I have raised this as a separate query too, but as this thread is already active, asking it here too.

---

<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 10, 2019, 5:16pm UTC](https://discuss.elastic.co/t/does-elastic-search-give-users-capability-to-create-custom-thread-pool/185445/6 "2019-07-10T17:16:54Z")

</div>

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