Does transport client cache nodes in the cluster?

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("", ElasticsearchClusterName).build()
val esClient = TcpClient.transport(settings, ElasticsearchClientUri(s"elasticsearch://$ElasticsearchHost:$ElasticsearchPort"))

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