I'm having three nodes one acts as master and two as data nodes. I need to ensure high availability. I want master to write data only to one node, say node A and other node will be only read-only node, node B. But if node A goes down, I prefer node B to be changed to write node and get the data, till node A comes up.
Ideally I need my data to be written to one node, which is active
Elasticsearch does not work that way. If you want high availability you need to make all nodes master eligible as a minimum of 3 master eligible nodes is required. If you are on a version prior to 7.x you also need to set minimum_master_nodes to 2. Then make sure all indices have one replica configured and Elasticsearch will take care of the rest. You can read and write to any data node.
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.