vector icon indicating copy to clipboard operation
vector copied to clipboard

request.retry_4xx_responses parameter for http sink

Open tesibelda opened this issue 3 years ago • 2 comments

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 avatar Dec 08 '22 12:12 tesibelda

Related: https://github.com/vectordotdev/vector/issues/10870

jszwedko avatar Dec 08 '22 20:12 jszwedko

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.

tesibelda avatar Dec 17 '22 16:12 tesibelda