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

Feature/target rebalance #69

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

GoneLikeAir
Copy link
Contributor

Hi, recently I have finish a feature: target rebalance. It can make the load of prometheus more balance.

Why:

  1. The access frequency of deferent job is not the same;
  2. The series of targets in one group are close;
  3. If most of the targets in one group assign to one shard, the load of prometheus may not balance.

How:

  1. Group the target by job;
  2. Check the distribution status of the targets, judge whether it is balanced(check the diff between Max and Min shard);
  3. If not, move target from max shard to min shard.

This is the effect of this feature:
Before:
image
image

After:
image

image

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