Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cluster): ShardStatus V2 endpoint - optimizing response size for clusteringV2 ShardAssignmentStrategy #1926

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

sandeep6189
Copy link
Contributor

@sandeep6189 sandeep6189 commented Jan 6, 2025

Pull Request checklist

  • The commit(s) message(s) follows the contribution guidelines ?
  • Tests for the changes have been added (for bug fixes / features) ?
  • Docs have been added / updated (for bug fixes / features) ?

Current behavior : The response size of cluster/api/v1/{dataset}/status is greater than ~37KB for a 256 shards cluster. This could utilize a lot of network bandwidth, especially if the status calls is used frequently across nodes of cluster.

New behavior : Adding another endpoint statusV2, which compresses the shard status information in a bit map representation to reduce the response size from 37KB to 172 Bytes ( for a 256 shards cluster ). This doesn't makes any changes in the way we track the shard status and it's interaction with the actors. It is merely a wrapper on top of ShardMapper on the response time.

NOTE: No breaking changes as we are not changing the way ShardMapper tracks the shard status. There is also no change to the existing Ask/HTTP/CLI calls.

Copy link
Contributor

@kvpetrov kvpetrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sandeep6189 sandeep6189 merged commit 7c49227 into filodb:develop Jan 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants