wfe/ra: Periodically load rate limit overrides from the database #8407
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.
WIP: Add tests.
Add a
refreshOverrides
func to theratelimits.limitRegistry
struct. Instead of populating the staticoverrides
field once when creating an instance of the struct, call the new func at startup and then every 30 minutes.Emit relevant logs and metrics from
limitRegistry
.Add an
OverridesFromDB
feature flag to read overrides from the DB instead of a file.Flatten
newLimitRegistry.*()
methods' logic into their sole caller,NewTransactionBuilder()
.Rename
loadDefaults()
&loadOverrides()
, appendingFromFile
for clarity/consistency.test: Add ra-sct-provider dependency on SA.
Important for deployment: If the
OverridesFromDB
feature flag is enabled, starting the RA now depends on the SA. The RA must be added as a gRPC client ofsa.StorageAuthorityReadOnly
.Fixes #8382