# TransportClient Connection Pool using JavaAPI

**URL:** https://discuss.elastic.co/t/transportclient-connection-pool-using-javaapi/40193
**Category:** Elasticsearch
**Created:** [January 27, 2016, 6:54am UTC](https://discuss.elastic.co/t/transportclient-connection-pool-using-javaapi/40193 "2016-01-27T06:54:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![anusha6](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@anusha6](https://discuss.elastic.co/u/anusha6)
#### Post date: [January 27, 2016, 6:54am UTC](https://discuss.elastic.co/t/transportclient-connection-pool-using-javaapi/40193/1 "2016-01-27T06:54:21Z")

</div>

Hello Team,  
I would like to know the default size that a connection pool is having for TransportClient, and how to check the size that connection pool is holding??  
Is this default setting is a good practice or else do we need to set the size????  
May I know how to proceed on this???

---

<div class="post-metadata">

### Author: ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)
#### Post date: [January 27, 2016, 8:04am UTC](https://discuss.elastic.co/t/transportclient-connection-pool-using-javaapi/40193/2 "2016-01-27T08:04:03Z")

</div>

The connection pool of TransportClient is the same as in a cluster node.

Look at org.elasticsearch.transport.netty.NettyTransport, there you can learn about thread pools for networking with Netty.

You don't need to change this. It is a bad practice to change the default settings. Note, the worker threads are more than enough, the pool has been cached, i.e. unbounded, but changed in recent time to the number of CPU \* 2

---

<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, 11:21pm UTC](https://discuss.elastic.co/t/transportclient-connection-pool-using-javaapi/40193/3 "2017-07-05T23:21:11Z")

</div>


