Skip to content

remote-write: respect Retry-After header on 5xx errors#12677

Merged
bboreham merged 3 commits intoprometheus:mainfrom
bboreham:retry-on-500
Sep 20, 2023
Merged

remote-write: respect Retry-After header on 5xx errors#12677
bboreham merged 3 commits intoprometheus:mainfrom
bboreham:retry-on-500

Conversation

@bboreham
Copy link
Copy Markdown
Member

If the server sent it to us, we should assume it knows better than we do and respect it.

Fixes #12674

@cstyan
Copy link
Copy Markdown
Member

cstyan commented Aug 16, 2023

👍 fine by me, can we update a test similar to TestClientRetryAfter and docs as well stating that the header will be respected for 500 errors

@wildum
Copy link
Copy Markdown
Contributor

wildum commented Sep 8, 2023

I created a PR to @bboreham's branch with a refactor of the test and an additional test case for the HTTP 500 retry: bboreham#2

bboreham and others added 3 commits September 20, 2023 10:14
If the server sent it to us, we should assume it knows better than we
do and respect it.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
The new version features a set of test cases that simplify the addition
of new HTTP status codes.

Signed-off-by: William Dumont <william.dumont@grafana.com>
and compare the retryAfter values.

Signed-off-by: William Dumont <william.dumont@grafana.com>
@bboreham
Copy link
Copy Markdown
Member Author

I have included William's test (thanks!) and rebased.

Copy link
Copy Markdown
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Thanks 👍🏽

@bboreham bboreham merged commit 2b77ad4 into prometheus:main Sep 20, 2023
@bboreham bboreham deleted the retry-on-500 branch September 20, 2023 14:02
tpaschalis pushed a commit to grafana/prometheus that referenced this pull request Oct 2, 2023
remote-write: respect Retry-After header on 5xx errors
tpaschalis pushed a commit to grafana/prometheus that referenced this pull request Oct 3, 2023
remote-write: respect Retry-After header on 5xx errors
tpaschalis pushed a commit to grafana/prometheus that referenced this pull request Oct 11, 2023
remote-write: respect Retry-After header on 5xx errors
(cherry picked from commit 2b77ad4)
tpaschalis pushed a commit to grafana/prometheus that referenced this pull request Oct 16, 2023
remote-write: respect Retry-After header on 5xx errors
(cherry picked from commit 2b77ad4)
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.

Respect Retry-After header on non-429 requests.

5 participants