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

Use only target address for allocation in consistent-hashing strategy #2290

Merged

Conversation

swiatekm
Copy link
Contributor

Description:
For the consistent-hashing strategy, base target allocation decisions only on the target url. This way, for a given collector count, we always assign targets with the same url to the same collector. Before, this decision was based on all target labels, and targets could therefore be moved between collectors even if collector count stayed the same.

Link to tracking Issue: #2280

Testing:

Tested this in a ~500 Node production cluster in addition to the unit tests. It behaved as expected and over time resulted in an average drop of around 10% in CPU and memory usage with around 4000 scrape targets.

@swiatekm swiatekm requested review from a team October 30, 2023 13:26
@jaronoff97
Copy link
Contributor

What did the balance of targets per collector look like after you tested this?

@swiatekm
Copy link
Contributor Author

swiatekm commented Nov 2, 2023

What did the balance of targets per collector look like after you tested this?

The relative standard deviation of it stayed roughly the same, which for this particular environment with consistent hashing is around 0.2.

@jaronoff97 jaronoff97 enabled auto-merge (squash) November 28, 2023 21:26
@jaronoff97
Copy link
Contributor

@swiatekm-sumo looks like a unit test failure?

@swiatekm
Copy link
Contributor Author

@swiatekm-sumo looks like a unit test failure?

Fixed, needed to make all the test data generators assign different target urls to their generated targets.

@jaronoff97 jaronoff97 merged commit 3e1a91f into open-telemetry:main Nov 29, 2023
27 checks passed
@swiatekm swiatekm deleted the ta/really-consistent-hashing branch November 29, 2023 10:35
ItielOlenick pushed a commit to ItielOlenick/opentelemetry-operator that referenced this pull request May 1, 2024
…open-telemetry#2290)

Co-authored-by: Jacob Aronoff <jaronoff97@users.noreply.github.com>
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.

Scrape targets can be reassigned even when collector count doesn't change
2 participants