I have an Elasticsearch (v5.6.10) cluster with 3 nodes.
Node A : Master
Node B : Master + Data
Node C : Master + Data
There are 6 shards per data node with replication set as 1. All 6 primary nodes are in Node B and all 6 replicas are in Node C.
When I shutdown one node for maintenance I can see indexing or search requests still trying to reach that node and failing. I suspect this is because the client connecting to elastic is configured with all three node IPs.
Is there any way to avoid the requests reaching that down node?
I am trying to find a solution where client does not face errors in this situation.
I saw that cluster status being yellow does not cause any issue during the maintenance period. But if a request goes to the down node, that’s when the problem occurs.
And, yes they are very old. I am planning for the upgrade, but it will take some time. For now I need to keep things running..
The client contains a connection pool, which should mark connections as down once this has been detected. You could therefore see a few requests target the downed node before this is detected. This assumes you are using tbe client correctlt as a singleton and not creating it for each request.
I never used it but I guess it works that way according to the doc
It is also possible to enable sniffing on failure, meaning that after each failure the nodes list gets updated straightaway rather than at the following ordinary sniffing round. In this case a SniffOnFailureListener needs to be created at first and provided at RestClient creation. Also once the Sniffer is later created, it needs to be associated with that same SniffOnFailureListener instance, which will be notified at each failure and use the Sniffer to perform the additional sniffing round as described.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.