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: allow enforcing maximum buffer size for write request pool #8082

Merged
merged 9 commits into from
May 10, 2024

Conversation

ortuman
Copy link
Contributor

@ortuman ortuman commented May 8, 2024

What this PR does

This PR adds a new experimental CLI parameter called -distributor.max-request-pool-buffer-size that allows enforcing a maximum size in bytes for the pool buffers used for decompressing request bodies in both Prometheus and OTLP handlers. By default, this is set to 0, which means no maximum will be enforced (same behavior as currently).

Additionally, a new metric named cortex_distributor_uncompressed_request_body_size_bytes has been included in order to provide visibility on the average of uncompressed body payload, thus allowing for an informed decision to be made when setting the previously mentioned maximum.

Which issue(s) this PR fixes or relates to

Fixes N/A

Checklist

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

@ortuman ortuman force-pushed the ortuman/use-bucketed-buffers-in-util-request-buffers branch 15 times, most recently from 0dad20e to 48f2395 Compare May 9, 2024 09:58
@ortuman ortuman changed the title util: make use of a bucketed pool in util.RequestsBuffers distributor: allow enforcing write request pool buffer max size May 9, 2024
@ortuman ortuman changed the title distributor: allow enforcing write request pool buffer max size distributor: allow enforcing maximum write request pool buffer size May 9, 2024
@ortuman ortuman marked this pull request as ready for review May 9, 2024 10:32
@ortuman ortuman requested review from jdbaldry and a team as code owners May 9, 2024 10:32
@ortuman ortuman requested review from pracucci and aknuds1 May 9, 2024 10:32
pkg/distributor/push.go Outdated Show resolved Hide resolved
pkg/distributor/push.go Outdated Show resolved Hide resolved
@ortuman ortuman force-pushed the ortuman/use-bucketed-buffers-in-util-request-buffers branch from bd69180 to ba524a2 Compare May 9, 2024 12:35
@ortuman ortuman requested a review from colega May 9, 2024 14:01
@ortuman ortuman changed the title distributor: allow enforcing maximum write request pool buffer size distributor: allow enforcing maximum buffer size for write request pool May 9, 2024
Copy link
Contributor

@colega colega left a comment

Choose a reason for hiding this comment

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

LGTM, left a nitpick. Thanks.

Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
ref: #8082 (comment)

Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
ref: #8082 (comment)

Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
ref: #8082 (comment)

Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
ref: #8082 (comment)

Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
ref: #8082 (comment)

Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
@ortuman ortuman force-pushed the ortuman/use-bucketed-buffers-in-util-request-buffers branch from a2ae178 to e298f7b Compare May 10, 2024 14:21
@ortuman ortuman merged commit d7987c9 into main May 10, 2024
29 checks passed
@ortuman ortuman deleted the ortuman/use-bucketed-buffers-in-util-request-buffers branch May 10, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants