8000 Added method to build target shard count for subcluster and target load per instance by RiyaTyagi · Pull Request #4359 · m3db/m3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added method to build target shard count for subcluster and target load per instance #4359

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

Open
wants to merge 1 commit into
base: sub-cluster-3
Choose a base branch
from

Conversation

RiyaTyagi
Copy link
Collaborator
@RiyaTyagi RiyaTyagi commented Jun 27, 2025

What this PR does / why we need it:

After scanning the current load of the cluster we will need to build the target load of the cluster's instances. This includes:

  • assigning load to each instances based on the nodes in each isolation group. This implementation is similar to that in sharded algorithm with an exception that each instance have the same weight and the number of isolation groups is equal to the replication factor.
  • assigning the target shard count to subclusters that exists in the placement. If a new subcluster has been added to the placement then we will be moving shards from existing subclusters so that each subcluster has same number of shards.
    • If the number of shards in the cluster is not a multiple of the number of subclusters in the placement i.e, numberOfShards % numberOfSubcluster != 0 the extra shards will be assigned to the existing subclusters sorted in ascending order by the subclusterID.
    • When a subcluster is removed its shards are moved to existing subcluster and in that case we exclude that subclusterID from the targetShardCount calculation.

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.

1 participant
0