# ECE & RestHighLevelClient Configuration

**URL:** <https://discuss.elastic.co/t/ece-resthighlevelclient-configuration/173370>\
**Category:** Elastic Cloud Enterprise (ECE)\
**Created:** [March 21, 2019, 5:52pm UTC](https://discuss.elastic.co/t/ece-resthighlevelclient-configuration/173370 "2019-03-21T17:52:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiran\_reddy1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kiran_reddy1/32/42537_2.png) [@kiran\_reddy1](https://discuss.elastic.co/u/kiran_reddy1)\
**Post date:** [March 21, 2019, 5:52pm UTC](https://discuss.elastic.co/t/ece-resthighlevelclient-configuration/173370/1 "2019-03-21T17:52:19Z")

</div>

Hi Team,

Trying to connect to ECE on premise cluster through Rest client. https://:{hostname}/cluster/{clusterid} . There are three nodes in the cluster and can scale. Trying to connect to cluster with out mentioning node selector or all the http ip:port addresses of nodes. cluster can scale to more nodes and requires a code change if it happens . is there a way to achieve this ?

local docker image for localhost:9200 works just fine.

Thanks

---

<div class="post-metadata">

**Author:** ![kiran\_reddy1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kiran_reddy1/32/42537_2.png) [@kiran\_reddy1](https://discuss.elastic.co/u/kiran_reddy1)\
**Post date:** [March 21, 2019, 7:14pm UTC](https://discuss.elastic.co/t/ece-resthighlevelclient-configuration/173370/2 "2019-03-21T19:14:41Z")

</div>

Found the answer

> Blockquote  
> Header defaultHeaders = new Header{  
> new BasicHeader("X-Found-Cluster", clusterName)};

---

<div class="post-metadata">

**Author:** ![Alex\_Piggott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_piggott/32/11053_2.png) [@Alex\_Piggott](https://discuss.elastic.co/u/Alex_Piggott)\
**Post date:** [March 21, 2019, 7:18pm UTC](https://discuss.elastic.co/t/ece-resthighlevelclient-configuration/173370/3 "2019-03-21T19:18:55Z")

</div>

The default format for accessing clusters via REST is `https://{clusterid}.{ece_virtual_root}:9243` where virtual root is a wildcard DNS entry that resolves `*.{ece_virtual_root}` to one of the ECE proxy hosts

(We provide a default virtual root if you have internet access to make it easy to get up and running without needing slightly fiddly DNS config)

There is some useful docs for this: [https://www.elastic.co/guide/en/cloud-enterprise/1.1/ece-administering-endpoints.html](https://www.elastic.co/guide/en/cloud-enterprise/1.1/ece-administering-endpoints.html)

---

<div class="post-metadata">

**Author:** ![kiran\_reddy1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kiran_reddy1/32/42537_2.png) [@kiran\_reddy1](https://discuss.elastic.co/u/kiran_reddy1)\
**Post date:** [March 21, 2019, 10:19pm UTC](https://discuss.elastic.co/t/ece-resthighlevelclient-configuration/173370/4 "2019-03-21T22:19:23Z")

</div>

Hi Alex,

Tried it, looks like the infrastructure is different, But the header param worked . Thanks for looking in to it

---

<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 4, 2019, 10:19pm UTC](https://discuss.elastic.co/t/ece-resthighlevelclient-configuration/173370/5 "2019-04-04T22:19:24Z")

</div>

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