-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, if a custom resource failed to sync with Consul, we used the default retry backoff. This was an exponential backoff starting at 5ms and maxing out at 1000s (16m). This backoff was a poor UX for our common error case where one config entry cannot be applied due to a prerequisite, for example an ingress gateway entry cannot be applied until the protocol is set to http. The usual workflow to resolve this would be to look up the error, figure out the correct ServiceDefaults/ProxyDefaults, and then apply that resource. Once applied, the user needs to wait fo the ingress gateway (in this example) resource to be retried. With the default backoff config, because the user will have taken on the order of minutes to figure out the correct config, the exponential backoff will now be upwards of five minutes. The user will have to wait for a long time for the ingress gateway resource to be retried. This PR changes the backoff to start out at 200ms and max out at 5s. This fits our use-case better because the user will have to wait at max 5ms, usually if there's an error, retrying within 5ms does nothing, so waiting 200ms to start is fine, and finally, Consul servers can accept tens of thousands of writes per second so even if there are a ton of resources retrying every 5s, it won't be an issue.
- Loading branch information
Showing
11 changed files
with
45 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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