# Does the Elastic Client expect the servers in the cluster to be on a static IP?

**URL:** <https://discuss.elastic.co/t/does-the-elastic-client-expect-the-servers-in-the-cluster-to-be-on-a-static-ip/172873>\
**Category:** Elasticsearch\
**Created:** [March 18, 2019, 10:53pm UTC](https://discuss.elastic.co/t/does-the-elastic-client-expect-the-servers-in-the-cluster-to-be-on-a-static-ip/172873 "2019-03-18T22:53:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gopal.ramakrishnan](https://avatars.discourse-cdn.com/v4/letter/g/d9b06d/32.png) [@gopal.ramakrishnan](https://discuss.elastic.co/u/gopal.ramakrishnan)\
**Post date:** [March 18, 2019, 10:53pm UTC](https://discuss.elastic.co/t/does-the-elastic-client-expect-the-servers-in-the-cluster-to-be-on-a-static-ip/172873/1 "2019-03-18T22:53:29Z")

</div>

We have a elastic cluster with n node setup. In our setup, restart of the node will give a new ip address to the node. Every time we restart a node and it joins back the cluster the server is able to recover easily. The issue we are having is with the client. The client is not able to recover from this situation and the Queries hang until we restart our application/services and make it connect again. Does the client cache the IP address of the nodes? We are using the transport client now and moving towards using the high level rest client. Will the high level rest client be able to recover from this situation? Is there any configuration to override this behavior?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 19, 2019, 1:25am UTC](https://discuss.elastic.co/t/does-the-elastic-client-expect-the-servers-in-the-cluster-to-be-on-a-static-ip/172873/2 "2019-03-19T01:25:28Z")

</div>

I believe that the Rest Client will manage that situation better.

---

<div class="post-metadata">

**Author:** ![gopal.ramakrishnan](https://avatars.discourse-cdn.com/v4/letter/g/d9b06d/32.png) [@gopal.ramakrishnan](https://discuss.elastic.co/u/gopal.ramakrishnan)\
**Post date:** [March 19, 2019, 4:01am UTC](https://discuss.elastic.co/t/does-the-elastic-client-expect-the-servers-in-the-cluster-to-be-on-a-static-ip/172873/3 "2019-03-19T04:01:11Z")

</div>

Thanks for your response. Will there be any difference between the low-level rest client and high-level rest client in this regard particularly?

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [March 19, 2019, 4:17am UTC](https://discuss.elastic.co/t/does-the-elastic-client-expect-the-servers-in-the-cluster-to-be-on-a-static-ip/172873/4 "2019-03-19T04:17:38Z")

</div>

@gopal.ramakrishnan to which language (Java, C#/.NET, JavaScript, Python, Ruby, Go, etc.) client are you referring?

---

<div class="post-metadata">

**Author:** ![gopal.ramakrishnan](https://avatars.discourse-cdn.com/v4/letter/g/d9b06d/32.png) [@gopal.ramakrishnan](https://discuss.elastic.co/u/gopal.ramakrishnan)\
**Post date:** [March 19, 2019, 4:18am UTC](https://discuss.elastic.co/t/does-the-elastic-client-expect-the-servers-in-the-cluster-to-be-on-a-static-ip/172873/5 "2019-03-19T04:18:38Z")

</div>

Java

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 19, 2019, 8:11am UTC](https://discuss.elastic.co/t/does-the-elastic-client-expect-the-servers-in-the-cluster-to-be-on-a-static-ip/172873/6 "2019-03-19T08:11:12Z")

</div>

No. That's managed by the low level with the optional Sniffer: [https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/\_usage.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/_usage.html)

---

<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 16, 2019, 8:19am UTC](https://discuss.elastic.co/t/does-the-elastic-client-expect-the-servers-in-the-cluster-to-be-on-a-static-ip/172873/7 "2019-04-16T08:19:40Z")

</div>

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