pelias / terraform-elasticsearch

Terraform scripts for running an Elasticsearch cluster
10 stars 6 forks source link

Enable Adaptive Replica Selection #15

Closed missinglink closed 4 years ago

missinglink commented 4 years ago

This Article mentions a setting named cluster.routing.use_adaptive_replica_selection which may reduce latency by sending queries to replicas which are less busy, rather than simply round-robin-ing them.

ARS is available in Elasticsearch 6.1 and later, but is turned off by default in all 6.x releases. It can be turned on dynamically by changing the cluster.routing.use_adaptive_replica_selection setting:

note: this setting is enabled by default in ES7

PUT /_cluster/settings
{
  "transient": {
    "cluster.routing.use_adaptive_replica_selection": true
  }
}
orangejulius commented 4 years ago

We only support ES7 in this project now, so we should be getting this for free :)