amperity / vault-clj

Clojure client for Hashicorp's Vault secret management system.
Other
70 stars 17 forks source link

Remove automatic 5xx retries in the HTTP client #101

Closed greglook closed 1 year ago

greglook commented 1 year ago

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:

  1. Clients can't configure the behavior or wait time because it's hard-coded.
  2. Using Thread/sleep directly will block http-kit's callback thread and doesn't mix well with an async flow model.
  3. 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.