Notes > Elasticsearch
Exclude and drain nodes
cat <<EOF >> settings.json
{
"transient": {
"cluster.routing.allocation.exclude._name": "data-3,data-4"
}
}
EOF
curl -X PUT http://localhost:8200/_cluster/settings \
-H 'Content-Type: application/json' \
-d '@settings.json'
Increase recovery and rebalance speed
cat <<EOF >> settings.json
{
"persistent": {
"cluster.routing.allocation": {
"node_concurrent_recoveries": "16",
"cluster_concurrent_rebalance": "16",
"enable": "all"
},
"indices.recovery.max_bytes_per_sec": "200mb"
}
}
EOF
curl -X PUT http://localhost:8200/_cluster/settings \
-H 'Content-Type: application/json' \
-d '@settings.json'
13:45 09.09.2022