As I was building out a control flow handler in our main codebase, I realized that the automatic retries in the HTTP client code are problematic for a few reasons:
Clients can't configure the behavior or wait time because it's hard-coded.
Using Thread/sleep directly will block http-kit's callback thread and doesn't mix well with an async flow model.
The control flow can't see these, so it can't annotate an observability span with the failure info.
I concluded that the best thing to do here is to remove the automatic retries and leave it to the control flow to handle.
As I was building out a control flow handler in our main codebase, I realized that the automatic retries in the HTTP client code are problematic for a few reasons:
Thread/sleep
directly will blockhttp-kit
's callback thread and doesn't mix well with an async flow model.I concluded that the best thing to do here is to remove the automatic retries and leave it to the control flow to handle.