-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure cache #443
Configure cache #443
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪 |
e6397a3
to
e4798bc
Compare
Allow object TTL's to be configurable. Default apikey TTL to 15m to avoid auth bottleneck.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
val = "" | ||
} | ||
|
||
// If enabled, jitter allows us to randomize the expirtion of the artifact |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo "expirtion"
* Tweak server timeouts. Limit body size to defend malicious agent (cherry picked from commit f335936) * Refactor bulk init (cherry picked from commit 0cd883a) * Drop cache if configuration changes. Allow object TTL's to be configurable. Default apikey TTL to 15m to avoid auth bottleneck. (cherry picked from commit aadaa4c) Co-authored-by: Sean Cunningham <[email protected]>
What does this PR do?
Makes the TTL values on the cache objects configurable. Allows cache to be reconfigured without restarting the process. Cache is dropped on reconfiguration.
Increate the TTL on the api key to 15m with optional jitter. This is to work around latency issues at scale with validating API . In addition, validate that 'enabled' flag on the agent during auth. Between the 'enabled' flag, and the ability to drop the cache by reconfiguration in a break glass scenario, it seems minimize auth round trips to elastic. This takes load off the fleet-server as well as elastic.
Also, cache the case when an api key is not valid. This avoids roundtrip for an already disabled api key.
Why is it important?
The server runs into issues at large scale while trying to validate many ApiKeys at once. Particularly when a policy changes and there are many GET requests for artifacts.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.