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

Distributor limits #4071

Merged
merged 8 commits into from
Apr 15, 2021
Merged

Conversation

pstibrany
Copy link
Contributor

@pstibrany pstibrany commented Apr 12, 2021

What this PR does: This PR introduces two new limits for distributor: max ingestion rate (samples/sec) that distributor can accept, and max number of inflight requests. When these limits are reached, distributor returns error which is translated into 5xx.

In addition to limits, new metrics are introduced. These expose current values as well as limits.

This PR builts on top of #4070, and will be rebased after #4070 is merged. Done.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
@pstibrany pstibrany force-pushed the distributor-limits branch from 181a6dd to d9e543f Compare April 12, 2021 12:13
Copy link
Contributor

@stevesg stevesg left a comment

Choose a reason for hiding this comment

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

LGTM - clear to understand.

pkg/distributor/distributor.go Outdated Show resolved Hide resolved
pkg/distributor/distributor_test.go Show resolved Hide resolved
Co-authored-by: Steve Simpson <steve.simpson@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
@pstibrany pstibrany force-pushed the distributor-limits branch from 125b3d3 to c664a5c Compare April 12, 2021 12:20
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

Good job @pstibrany and thanks for working on distributor limits! I left few comments, overall LGTM!

pkg/distributor/distributor.go Outdated Show resolved Hide resolved
pkg/distributor/distributor.go Outdated Show resolved Hide resolved
pkg/distributor/distributor.go Show resolved Hide resolved
pkg/distributor/distributor.go Outdated Show resolved Hide resolved
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
@pstibrany
Copy link
Contributor Author

Thank you for reviews! I've addressed your feedback, please take a look again.

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

Very good job! LGTM (modulo the CHANGELOG fix). Thanks!

CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
@pstibrany pstibrany merged commit 94b0137 into cortexproject:master Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants