System index responsible for _cat/shards

Can anyone tell me which indices are responsible for the data pulled in when using the _cat/shards API?

It's from the cluster stats - Cluster state API | Elasticsearch Guide [8.3] | Elastic

Sure but I would assume there is an index somewhere storing this information? If so - what's the name of that index? If there is no index, how is the data stored for retrieval in a timely manner?

Cluster state is not an index, it's internal but it's actually stored on disk of each node.

Could you tell me where the size of the shards are retrieved from?

Probably cluster state as well, but I don't know for sure.

GET _cat/shards actually reaches out to all the nodes in the cluster to ask them about the shards they hold and their current sizes. This information isn't stored anywhere, it's obtained afresh each time you call the API.

1 Like

Oh, great to know!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.