Skip to content

[SVLS-10109] Prototype flag configuration caching inside Bottlecap - #1526

Draft
leoromanovsky wants to merge 3 commits into
DataDog:mainfrom
leoromanovsky:leoromanovsky/lambda-config-cache-prototype
Draft

leoromanovsky wants to merge 3 commits into
DataDog:mainfrom
leoromanovsky:leoromanovsky/lambda-config-cache-prototype

Conversation

@leoromanovsky

@leoromanovsky leoromanovsky commented Nov 17, 2026 •

Copy link
Copy Markdown

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

  1. Run the default Rust suite and Clippy for the default and test-mode builds.

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

  1. Run the process suite with the built extension, published SDK, fake Lambda API, and fake CDN.

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.

@leoromanovsky leoromanovsky changed the title [SVLS-10109] Prototype Lambda flag caching with a real Datadog SDK [SVLS-10109] Prototype flag configuration caching inside Bottlecap Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant