# Does transport client cache nodes in the cluster?

**URL:** <https://discuss.elastic.co/t/does-transport-client-cache-nodes-in-the-cluster/93243>\
**Category:** Elasticsearch\
**Created:** [July 14, 2017, 8:31pm UTC](https://discuss.elastic.co/t/does-transport-client-cache-nodes-in-the-cluster/93243 "2017-07-14T20:31:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![animageofmine](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@animageofmine](https://discuss.elastic.co/u/animageofmine)\
**Post date:** [July 14, 2017, 8:31pm UTC](https://discuss.elastic.co/t/does-transport-client-cache-nodes-in-the-cluster/93243/1 "2017-07-14T20:31:38Z")

</div>

We use transport client (elastic4s) to communicate with ES cluster via consul. One of the problems we have seen so far is that the client keeps sending queries to the dead nodes.

For example, if the data node `node1` is dockerized and if you stop the process inside the container (for testing purpose), but the container is still on, consul does not redirect the queries to that node. However, we still see the queries routed to the dead node `node1`. I know the client is cluster aware, but I am not sure if there is a way for it to detect the dead nodes and stop sending the queries to such nodes.

Any pointers would be very useful here. Thanks so much!

```
val settings = Settings.builder().put("cluster.name", ElasticsearchClusterName).build()
val esClient = TcpClient.transport(settings, ElasticsearchClientUri(s"elasticsearch://$ElasticsearchHost:$ElasticsearchPort"))
```

---

<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:** [August 11, 2017, 8:31pm UTC](https://discuss.elastic.co/t/does-transport-client-cache-nodes-in-the-cluster/93243/2 "2017-08-11T20:31:49Z")

</div>

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