Description
Is your feature request related to a problem? Please describe
cluster-state
typically grows into 100's of MB in size in case of large clusters with thousands of shard. API requests such as cat/shards
, cat/indices
and node/_stats
require copy of cluster-state and fetch it from cluster-manager. However cluster-state is also cached at node serving the API request and can be consumed if the node is in-sync with cluster-manager. This would avoid the serialization and transport overhead on cluster-manager to serve large cluster-state responses.
Describe the solution you'd like
We propose to introduce a new light-weight transport request to cluster-manager to return the cluster name, UUID, Term and Version of cluster-state. The node serving API request would use the new transport endpoint to verify if the cluster-state cached on the node is in-sync with the cluster-manager in the context of read request.
- If the cluster-state is in-sync with cluster-manager, use the cluster-state on the node to serve the incoming API request
- If the cluster-state is out-of-sync, make a subsequent transport call to fetch the latest cluster-state and then serve the incoming API request
Related component
Cluster Manager
Describe alternatives you've considered
No response
Additional context
API Response time /_cluster/state
from local and remote
curl http://localhost:9200/_cluster/state?local=true
-> 2652 ms
curl http://localhost:9200/_cluster/state?local=false
-> 3858 ms
Size of cluster-state -> 153 MB
Metadata
Assignees
Labels
Type
Projects
Status
✅ Done
Activity