liveBook · Manning

Cluster state

As explained in Elasticsearch in Action, Second Edition

Cluster state is the distributed metadata maintained by Elasticsearch about cluster-wide resources, including shards, replicas, schemas, mappings, and fields.

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

How Elasticsearch in Action, Second Edition covers it

How deep it goes
Explains metadata contents and phased quorum commits, including publication, acknowledgments, timeouts, and elections.
Examples
Uses stalled cluster updates, quorum acknowledgments, master elections, and snapshots containing cluster state.
What you can do after
Diagnose cluster-update delays by checking publication timeouts, acknowledgments, follower lag, and master-election behavior.
How it connects
Connects shards, replicas, mappings, schemas, master election, snapshots, templates, and ILM policies.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Elasticsearch in Action, Second Edition. The section links point to the parts of the book it draws on.