# ES 5.2 Java API connection queries-Client Object

**URL:** <https://discuss.elastic.co/t/es-5-2-java-api-connection-queries-client-object/130202>\
**Category:** Elasticsearch\
**Created:** [May 2, 2018, 7:43am UTC](https://discuss.elastic.co/t/es-5-2-java-api-connection-queries-client-object/130202 "2018-05-02T07:43:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiouser](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@jiouser](https://discuss.elastic.co/u/jiouser)\
**Post date:** [May 2, 2018, 7:43am UTC](https://discuss.elastic.co/t/es-5-2-java-api-connection-queries-client-object/130202/1 "2018-05-02T07:43:05Z")

</div>

We are using ES 5.2 with XPack and Java client. I am curious to know the following points:

Essentially, my cluster consist of 3 Coordinator/3 Master and 6 Data Nodes. Our client specifies IP/Port of all Coordinator nodes to connect.

a. What happens when I initialize the client with PreBuiltXPackTransportClient constructor by supplying Settings,PLUGINS and a hostfailure listener?

b. What happens when I invoke addTransportAddress(new InetSocketTransportAddress constructor) by supplying IP/Port of Co-ordinator nodes.

c. Does it mean Client creates a netty connection/channel to all Coordinator nodes?

d. Internally if sniffing is enabled all the data nodes,master nodes is available to the client. Client does not connect/create a channel to coordinator but forward all request directly to data node.. Is this understanding correct?

e. Does client ever communicate with Data nodes directly bypassing Co-ordinator nodes?

f. Does client maintain a thread pool which queues up different ES operations being invoked from multiple threads using the same client? If yes what is the queue size at the client.

g. Can I create client object connection pool and shuffle across client objects in the same application? How much of that will be an overhead ?

What is understood from the ES5.2 documentation is that client does not bind to the address specified but just connect. Sniffing enables getting all Master/Data nodes information being available at Client.

However Since its Transport Client we are assuming it must be creating Netty Channel.

Guidance will be really helpful.

Thanks.

---

<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 30, 2018, 7:43am UTC](https://discuss.elastic.co/t/es-5-2-java-api-connection-queries-client-object/130202/2 "2018-05-30T07:43:16Z")

</div>

Closed on May 30, 2018, 7:43am UTC

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