# Connection Pool

**URL:** https://discuss.elastic.co/t/connection-pool/20434
**Category:** Elasticsearch
**Created:** [October 26, 2014, 5:09pm UTC](https://discuss.elastic.co/t/connection-pool/20434 "2014-10-26T17:09:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![pooja\_fiserv](https://avatars.discourse-cdn.com/v4/letter/p/f0a364/32.png) [@pooja\_fiserv](https://discuss.elastic.co/u/pooja_fiserv)
#### Post date: [October 26, 2014, 5:09pm UTC](https://discuss.elastic.co/t/connection-pool/20434/1 "2014-10-26T17:09:23Z")

</div>

Hi,

I want to know how to create connection pool for connecting to Elastic  
Search using java.

Now, using TransportClient in java.

And also, How TransportClient handle connection?

Looking forward for quick reply.

Thanks.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/69e84cce-3ef8-4f13-9df7-35385d3dca2e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/69e84cce-3ef8-4f13-9df7-35385d3dca2e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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: [October 26, 2014, 6:43pm UTC](https://discuss.elastic.co/t/connection-pool/20434/2 "2014-10-26T18:43:10Z")

</div>

The TransportClient creates connections automatically.

You can set number of worker threads in the setting  
transport.netty.worker\_count

See also source code

[https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/transport/netty/NettyTransport.java#L101](https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/transport/netty/NettyTransport.java#L101)

for more settings regarding connections per node.

Jörg

On Sun, Oct 26, 2014 at 6:09 PM, [pooja.fiserv@gmail.com](mailto:pooja.fiserv@gmail.com) wrote:

> Hi,
> 
> I want to know how to create connection pool for connecting to Elastic  
> Search using java.
> 
> Now, using TransportClient in java.
> 
> And also, How TransportClient handle connection?
> 
> Looking forward for quick reply.
> 
> Thanks.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/69e84cce-3ef8-4f13-9df7-35385d3dca2e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/69e84cce-3ef8-4f13-9df7-35385d3dca2e%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/69e84cce-3ef8-4f13-9df7-35385d3dca2e%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/69e84cce-3ef8-4f13-9df7-35385d3dca2e%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoF2fh%3DM5Kiv7DtuiK5KSYZ0EybVk5TKi%2BXCUOd1OXiBsA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoF2fh%3DM5Kiv7DtuiK5KSYZ0EybVk5TKi%2BXCUOd1OXiBsA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:53am UTC](https://discuss.elastic.co/t/connection-pool/20434/3 "2017-07-06T00:53:52Z")

</div>


