Cluster state is the distributed metadata that describes Elasticsearch resources such as shards, replicas, schemas, mappings, and fields. The master maintains it, while each node receives and stores the global state. section 14.6.3 section 14.6.2
A cluster-state update follows a coordinated commit process:
- The master computes the required cluster changes. section 14.6.3
- The master publishes the changes to individual nodes. section 14.6.3
- Nodes acknowledge receipt without immediately applying the updates locally. section 14.6.3
- After a quorum of master-eligible nodes acknowledges, the master commits the state and instructs nodes to commit their pending changes. section 14.6.3
When a cluster update stalls
If an update does not commit within the 30-second cluster.publish.timeout, the master may be considered dead and a new master election can begin. Nodes that acknowledge late remain tracked during the follower-lag grace period. section 14.6.3 section 14.6.2
Cluster state can also be included in snapshots alongside indexes, data streams, templates, and ILM policies, allowing broader cluster configuration to be backed up and restored. section 14.7
