Skip to content

receive: Add retry-after backoff with jitter via header field to active-series-limiting #8356

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: main
Choose a base branch
from

Conversation

roth-wine
Copy link
Contributor

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

By default, the active-series-limiting does only return a 429 when the tenant exceeded the limit. Prometheus does parse the retry-after header by default¹ and if the header is not set, it will do not set a default backoff on prometheus side. This results in a instant retry of sending the data again which may result in a potential increase of requests.

¹https://github.com/prometheus/prometheus/blob/bfbae39931a6ddeb5913a6ea8d48a34bbebc6d29/storage/remote/client.go#L309

@roth-wine roth-wine force-pushed the pr_add_retry_after_to_active_series_limiting branch 2 times, most recently from 643515c to fe113bf Compare July 2, 2025 09:11
@pull-request-size pull-request-size bot added size/M and removed size/S labels Jul 2, 2025
@roth-wine roth-wine force-pushed the pr_add_retry_after_to_active_series_limiting branch from fe113bf to 80ce0bc Compare July 2, 2025 09:13
@pull-request-size pull-request-size bot added size/S and removed size/M labels Jul 2, 2025
@roth-wine
Copy link
Contributor Author

As far is a can see in the contributions for the thanos receive active series limiting stuff, maybe @GiedriusS or @saswatamcode can have a look at this?

Copy link
Member

@saswatamcode saswatamcode left a comment

Choose a reason for hiding this comment

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

Generally LGTM, just a comment!

@roth-wine roth-wine force-pushed the pr_add_retry_after_to_active_series_limiting branch from 08c0f07 to f13031b Compare July 29, 2025 06:17
…ve-series-limiting

By default, the active-series-limiting does only return a 429 when the
tenant exceeded the limit. Prometheus does parse the retry-after header
by default¹ and if the header is not set, it will do not set a default
backoff on prometheus side. This results in a instant retry of sending
the data again which may result in a potential increase of requests.

¹https://github.com/prometheus/prometheus/blob/bfbae39931a6ddeb5913a6ea8d48a34bbebc6d29/storage/remote/client.go#L309

Signed-off-by: roth-wine <[email protected]>
@roth-wine roth-wine force-pushed the pr_add_retry_after_to_active_series_limiting branch from f13031b to b280f42 Compare July 29, 2025 06:19
@roth-wine
Copy link
Contributor Author

@saswatamcode I have adjusted everything we have discussed before and rebased the branch to get this thing merged.
Failing tests seems flaky and are unrelated to my changes.

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.

2 participants