Chapter 46. Post-Deployment
Once you have deployed your cluster in production, there are some tools and best practices to keep your cluster running in top shape. In this short chapter, we talk about configuring settings dynamically, tweaking logging levels, improving indexing performance, and backing up your cluster.
Changing Settings Dynamically
Many settings in Elasticsearch are dynamic and can be modified through the API. Configuration changes that force a node (or cluster) restart are strenuously avoided. And while it’s possible to make the changes through the static configs, we recommend that you use the API instead.
The cluster-update
API operates in two modes:
- Transient
-
These changes are in effect until the cluster restarts. Once a full cluster restart takes place, these settings are erased.
- Persistent
-
These changes are permanently in place unless explicitly changed. They will survive full cluster restarts and override the static configuration files.
Transient versus persistent settings are supplied in the JSON body:
PUT
/
_cluster
/
settings
{
"persistent"
:
{
"discovery.zen.minimum_master_nodes"
:
2
},
"transient"
:
{
"indices.store.throttle.max_bytes_per_sec"
:
"50mb"
}
}
This persistent setting will survive full cluster restarts.
This transient setting will be ...
Get Elasticsearch: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.