Hi, I have 3 elasticsearch server(serverA, serverB,ServerC). In this ServerA and ServerB in same datacenter and server 3 in another Datacenter.
I disabled master node eligibility in Server 3 . ServerA and Server B configured in High availability using HAproxy(active and passive). When Server A goes down Server B becomes master and HAProxy route all traffic to ServerB. When Server A comes back online still server B be master. As I configured Active -passive in Haproxy it sends requests to server A.
I need Server A to be master . Please help me how to achieve this.
Elasticsearch is deployed in a cluster, not in a master-slave architecture. You should always look to have at least 3 master-eligible nodes in order to avoid split-brain scenarios. You can also not control which node is the elected master as Elasticsearch can change this due to events in the cluster. Master nodes are not involved in the general indexing and query flow and any request can be sent to any node in the cluster, so you should not need to worry about where it is located at all.
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.