docker-volume-hetzner
docker-volume-hetzner copied to clipboard
Improvement: Add Backoff for Rate Limits
Currently it can happen that for whatever reason the requests to the Hetzner Cloud API are going a bit crazy, causing 429 errors.
Currently, once a rate limit is reached, we keep hammering the rate API and we never get out of the rate limit issue.
To me it is still a bit unclear whether we want to just communicate back the error to the docker engine directly or whether we want to wrap the calling code in https://github.com/cenkalti/backoff to automatically do the backoff.
Prototype here: https://github.com/costela/docker-volume-hetzner/compare/master...neuroforgede:docker-volume-hetzner:master
Currently evaluating.
@costela What are your thoughts on this?
@costela ping
sorry, I'm bit swamped, as always :sweat:
I understand the motivation, but I'm not sure about the particular solution. Why not something a bit more general like WithBackoffFunc?
No worries.
If I read the docs for WithBackoffFunc correctly this is used for automatic retrying of requests. We don't want automatic retries though, right? I'd rather have the volume creation fail?
ah, you mean the fact that the retries are endless? Yes, that's a bit of a problem. But I'd suggest making that improvement at the hcloud-go
side? Adding a way to stop retrying?
That feels like the better way to put this?