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
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