Repository navigation
[SVLS-10109] Prototype flag configuration caching inside Bottlecap - #1526
Draft
leoromanovsky wants to merge 3 commits into
Draft
leoromanovsky wants to merge 3 commits into
leoromanovsky wants to merge 3 commits into
Conversation
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.
Problem
Each flag configuration GET through Bottlecap currently reaches the CDN. Lambda customers need control over freshness and startup waits without operating another service.
This PR
Adds an opt-in cache to Bottlecap's existing authenticated configuration route. The extension owns refresh, conditional requests, and concurrent request coalescing. Customers control the refresh interval, maximum stale age, wait budget, and failure backoff.
The co-hosted Lambda handler uses the published Datadog Node server provider 2.7.0 with supplied configuration and no SDK configuration poller. The cache is disabled by default. Fresh environments still bootstrap, and restarting Bottlecap discards its cache.
The prototype stores at most eight scopes and 8 MiB per response.
This is an exploratory follow-up to SVLS-10109.
Testing
Test 1: Extension regressions
Steps
Result
810 tests passed; one skipped. Both Clippy builds passed. Forwarding coverage includes credential and environment isolation, invalid refreshes, retry backoff, bounded waits, and existing authentication behavior.
Test 2: Real Bottlecap and Datadog SDK
Steps
Result
Five tests passed. Across 105 simulated invocations, caching made one CDN request; passthrough made 105. Tests also cover five SDK processes sharing one extension, concurrent reads, expiry and recovery, revoked credentials, process suspension, and independent cold environments.
Results are local macOS/arm64 tests. AWS deployment and FIPS checks were not run. Full configuration validation, response-signing integration, large-list compatibility, resource profiling, and exposure delivery remain follow-up work.