I have only two servers, how I should configure elasticsearch nodes to get high availability and avoid split-brain?
should I only have one node on each server?
Version 7.0 and above automatically manages the quorum size, so you do not risk suffering from split-brain scenarios due to misconfiguration as in earlier versions. As Elasticsearch requires a strict majority of master-eligible nodes to be available in order to elect a master you can not achieve high-availability with only 2 servers. For high availability you need at least 3 servers and nodes.
Thank you for the answer @Christian_Dahlqvist
How about to have two nodes on one server and the third one on another server?
In that case you can handle the server with only one node going down and still have a functioning cluster. If the cluster with two nodes however goes down you no longer have an available cluster.
A common way to get around this is to find a small third host and install a dedicated master node there. This does not hold data and use limited resouces, leaving the two larger servers to do all the work. You can nowadays even configure this to be voting-only, which somewhat relaxes latency requirements.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.