Repository navigation
✨ Start the reconcile backoff at 1s and cap it at 5m - #2373
Draft
corioliskraft wants to merge 1 commit into
Draft
corioliskraft wants to merge 1 commit into
corioliskraft wants to merge 1 commit into
Conversation
The Hetzner controllers used the default per-object rate limiter of controller-runtime: 5ms, doubled up to 1000s. An object that kept failing could call the HCloud or Robot API about 10 times in the first 5s, which can hit the API rate limit. Now, after a reconcile error or a Requeue without RequeueAfter, the delay for an object starts at 1s and doubles up to 5m. A watch event or a resync can start a reconcile sooner. The new flag --backoff-base-delay sets the base delay (default 1s). The manager does not start when the value is 0 or less, or larger than 5m.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Problem: after a reconcile error, controller-runtime requeues the object with its default per-object backoff: 5ms, doubled up to 1000s. So one failing object can call the HCloud or Robot API about 10 times in the first 5s. All objects that use the same Hetzner secret share its API rate limit.
Solution: each of the 7 controllers that reconcile Hetzner objects gets its own backoff. It starts at 1s and doubles up to 5m. A watch event or a resync can start a reconcile sooner. The new flag
--backoff-base-delaysets the base delay.Which issue(s) this PR fixes:
Fixes #1757
Special notes for your reviewer:
--backoff-base-delay(default 1s), as proposed in the issue.GuestCSRReconcilerandCRDMigratorkeep the default backoff, because they make no Hetzner API calls.TODOs: