ECE & RestHighLevelClient Configuration

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

Found the answer

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

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

Hi Alex,

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

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