I have an elasticsearch 7.3 cluster with 3 nodes. My application is using es rest client in order to communicate with es. Client uses connection url which is node1:node2:node3
My question - is it possible to add new node4 to es cluster so that rest client discover it (of course without app restart)? Or maybe rest call will be to node1 which will somehow redirect it to newly added node.
ps. I started to think about above mentioned question - whether I need LB between client and es cluster or no...
Found answer in es doc.
Once a RestClient instance has been created, a Sniffer can be associated to it. The Sniffer will make use of the provided RestClient to periodically (every 5 minutes by default) fetch the list of current nodes from the cluster and update them by calling RestClient#setNodes.
Link to doc - rest client usage, sniffer