Skip to content

Conversation

@Pranshu-S
Copy link
Contributor

…tats with flags

Description

The current implementation of the cluster stats API includes mapping and analysis stats by default. While this does not cause any significant overhead for small and medium clusters, iterating over the entire cluster state on the coordinator node to generate these stats can incur significant overhead in large clusters, especially with complex mappings or a large cluster state.

image

This pull request proposes introducing a new experimental flag, opensearch.experimental.optimization.cluster_stats.response_level (default: 2), to control the inclusion of mapping and analysis stats in the cluster stats response:

Response Level Mapping Stats Analysis Stats
1 No No
2 Yes Yes

Benefits:

  1. Reduced Overhead: Users managing large clusters can choose response level 1 to exclude mapping and analysis stats, improving the performance of the cluster stats API call.
  2. Fine-Grained Control: Users can tailor the response to their specific needs, reducing unnecessary data transfer and processing.

For users who still require mapping and analysis stats at response level 1, the following parameters can be included in the REST call:

include_mapping_stats -> To include mapping stats
include_analysis_stats -> To include analysis stats

My Take on Response Levels:
While the introduction of response levels is an experimental step in this PR, it might be beneficial to explore further granularity in the future. Providing additional parameters within the REST API to allow users to choose specific layers of ClusterStats response would offer even finer control over the response content and minimize data transfer for various use cases.

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…tats with flags

Signed-off-by: Pranshu Shukla <pranshushukla06@gmail.com>
@Pranshu-S Pranshu-S force-pushed the NodeStatsOptimisation-ClusterStats-OptionalAnalysisAndMappingStats4 branch from 2ec8310 to 4841d6e Compare June 19, 2024 03:34
@github-actions
Copy link
Contributor

❌ Gradle check result for 2ec8310: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

❌ Gradle check result for 4841d6e: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@kotwanikunal
Copy link
Member

Stalled draft PR. Please reopen if you are still working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stalled Issues that have stalled

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants