Your ElasticSearch time machine
Apart from our indices and the data indexed inside them, ElasticSearch needs to hold the metadata, which can be of the type mappings, index-level settings, and all of that. All that information needs to be stored somewhere in order to be safe when the whole cluster restarts. It is due to these needs that ElasticSearch introduced the gateway module. You can think about it as a safe haven for your cluster data and metadata. Each time you start your cluster, all the needed data is read from the gateway, and when you make a change to your cluster it is persisted using the gateway module.
The gateway module
ElasticSearch allows us to use different gateway types, which we will discuss in a moment. In order to set the type of gateway we want to use, we need to add the gateway.type
property to the elasticsearch.yml
configuration file and set it to one of the following values:
local
: This specifies a local gatewayfs
: This specifies a shared filesystem gatewayhdfs
...