opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.59k stars 1.76k forks source link

[Feature Request] Use cache for cluster/health API #15685

Open SwethaGuptha opened 3 weeks ago

SwethaGuptha commented 3 weeks ago

Is your feature request related to a problem? Please describe

TransportClusterHealthAction computes the health of the object by aggregating over different states of the shards on the cluster. Currently for every API call, we iterate over all shards of all indices in the routing table by maintaining multiple objects at shard/index level. Since all these aggregations are performed using the routing table cluster state present with the master/local node, a cache can be maintained to serve the cluster health API without having to iterate over all shards on the cluster that could have potential compute and health benefits.

Describe the solution you'd like

A cache based solution to serve the _cluster/health API

Related component

Cluster Manager

Describe alternatives you've considered

No response

Additional context

No response

andrross commented 4 days ago

[Catch All Triage - 1, 2, 3]