0
votes

First of all, I would like to mention that I am not Elasticsearch expert.

I have a 3 node elasticsearch cluster. The utilization of the resources are not proportional to cost. So I have decided to reduce 2 nodes.

Now I am thinking what is the gracious way to kill 2 node out of 3 without downtime? What can be consequences?

I can not compeltely shut it down the whole cluster. Running Elasticsearch version: 5.6.8

Any help or suggestion will be really appreciated.

1
Out of three, how many are the master nodes? - Irfan Ali
I did not precisely define master nodes. - Mohammad Saifullah

1 Answers

1
votes
  1. For high availability you need at least 3 nodes for the master election. Be sure to set discovery.zen.minimum_master_nodes correctly:

    • 2 (= majority) for 3 nodes — only this is highly available
    • 2 for 2 nodes (also the majority), but you are losing HA because as soon as one node is down you will not be able to elect a master any more
    • 1 for 1 node
  2. If you are removing data nodes, be sure that the data is replicated to at least one other node. Either set the replication factor number_of_replicas to 2 (= 3 copies, so on all nodes in your case) if you want to kill 2 of the 3 nodes. Or slightly more gracefully, set "index.routing.allocation.require._name": "A" to ensure that data must be allocated on the node with the name A. Ensure with the cat shards API that the surviving node has all the required data.