Elasticsearch之recovery

definition

recovery is an index of slice process allocation to another node, and typically occurs in the snapshot recovery, replication slice index changes when a node failure or node restart occurs. The recovery process consumes additional network bandwidth resources cpu memory node points, and so on.

Data reduction caused by cluster full restart of copies back and forth

  1. During cluster startup, once the process starts with how much success and then perform the recovery master node and data nodes are considered in which

1 gateway.expected_nodes: 3

  2. There are several master node starts successfully, on the implementation of the recovery process

1 gateway.expected_master_nodes: 3

  3. There are several data node starts successfully, on the implementation of the recovery process

1 gateway.expected_data_nodes: 3

Before the above condition is satisfied, the recovery process will wait for a specified event, once the timeout condition will be determined according to the following

1 gateway.recover_after_nodes: 3     # 3 nodes (master and data nodes are considered) started successfully 
2 gateway.recover_after_master_nodes: 3   # 3 Ge has qualified master node starts successfully 
3 gateway.recover_after_data_nodes: 3    # 3 Ge has qualified node data successful start

Satisfies a condition wherein the above-described process will be executed

1 gateway.expected_data_nodes: 10
2 gateway.recover_after_time: 5m
3 gateway.recover_after_data_nodes: 8

Represents: cluster at this time within five minutes, there are 10 data are added to the cluster nodes, or more than eight data nodes join the cluster After 5 minutes, the recovery process will start.

Reduced copy of the data between the master copy

Restart a single node, will also have a copy back and forth between different nodes, to avoid this, it is possible before the restart, shut down a cluster of shard allocation

PUT _cluster/settings
{
  "transient": {
    "cluster.routing.allocation.enable":"none"
  }
}

And then perform a node restart

PUT _cluster/settings
{
  "transient": {
    "cluster.routing.allocation.enable":"all"
  }
}

 

Guess you like

Origin www.cnblogs.com/Alexephor/p/11411820.html