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

request.retry_4xx_responses parameter for http sink #15498

Closed
tesibelda opened this issue Dec 8, 2022 · 2 comments
Closed

request.retry_4xx_responses parameter for http sink #15498

tesibelda opened this issue Dec 8, 2022 · 2 comments
Labels
sink: http Anything `http` sink related type: feature A value-adding code addition that introduce new functionality.

Comments

@tesibelda
Copy link

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Use Cases

Currently Vector's http sink retries failed requests if the HTTP response status is 429, >= 500, and != 501 (doc). When using http sink some endpoints may return other HTTP codes that the user may be interested to retry, like HTTP 408. One example of this is Benthos.. This could also apply to devices at the edge with slow a network connection (reference).

Attempted Solutions

No response

Proposal

It would be helpful a configuration parameter for http sink, say request.retry_4xx_responses or request.retry_responses, that the user could use to specify particular HTTP response codes to retry its requests. To maintain compatibility, by default its value could be [429], and the user could configure to something like:
[sinks.my-sink]
request.retry_4xx_responses = [ 429, 408 ]

References

No response

Version

vector 0.25.2 (x86_64-pc-windows-msvc d690c44 2022-11-29)

@tesibelda tesibelda added the type: feature A value-adding code addition that introduce new functionality. label Dec 8, 2022
@jszwedko
Copy link
Member

jszwedko commented Dec 8, 2022

Related: #10870

@jszwedko jszwedko added the sink: http Anything `http` sink related label Dec 8, 2022
@tesibelda
Copy link
Author

Thanks @jszwedko. I will close this issue as #10870 is more general (I didn't saw it before opening this one) and its solution should also work for this particular use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sink: http Anything `http` sink related type: feature A value-adding code addition that introduce new functionality.
Projects
None yet
Development

No branches or pull requests

2 participants