request.retry_4xx_responses parameter for http sink
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)
Related: https://github.com/vectordotdev/vector/issues/10870
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.