The gateway and recovery modules
Apart from our indices and the data indexed inside them, Elasticsearch needs to hold the metadata, such as the type mappings, the index level settings, and so on. This information needs to be persisted somewhere so it can be read during cluster recovery. Of course, it could be stored in memory, but full cluster restart or a fatal failure would result in this information being lost, which is not something that we want. This is why Elasticsearch introduced the gateway module. You can think about it as a safe heaven 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
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 the local value. Currently, Elasticsearch recommends using the local gateway type (gateway...