# Rest Client Asynchronous Connection Settings

**URL:** <https://discuss.elastic.co/t/rest-client-asynchronous-connection-settings/80642>\
**Category:** Elasticsearch\
**Created:** [March 30, 2017, 9:31am UTC](https://discuss.elastic.co/t/rest-client-asynchronous-connection-settings/80642 "2017-03-30T09:31:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gok](https://avatars.discourse-cdn.com/v4/letter/g/8491ac/32.png) [@Gok](https://discuss.elastic.co/u/Gok)\
**Post date:** [March 30, 2017, 9:31am UTC](https://discuss.elastic.co/t/rest-client-asynchronous-connection-settings/80642/1 "2017-03-30T09:31:08Z")

</div>

Is there anyway I could set in RestClient to create a specific number of connections to ES?

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [March 30, 2017, 12:15pm UTC](https://discuss.elastic.co/t/rest-client-asynchronous-connection-settings/80642/2 "2017-03-30T12:15:32Z")

</div>

I don't think that is possible. The rest client is hard coded to have at most 30 connections to the cluster:

> <https://github.com/elastic/elasticsearch/blob/master/client/rest/src/main/java/org/elasticsearch/client/RestClientBuilder.java#L205>

Why do you want to change the number of connections to ES?

---

<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:** [April 27, 2017, 12:16pm UTC](https://discuss.elastic.co/t/rest-client-asynchronous-connection-settings/80642/3 "2017-04-27T12:16:24Z")

</div>

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