Elastic Search Cluster Active-passive

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.

That's a bad idea. Elasticsearch is sensitive to latency.

You need to restart server B.

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.

1 Like

i looking for failover .not loadbalancing

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