Skip to content

Experiment: compare Redis, Next remote cache, and uncached reads - #1196

Draft
jasonhedman wants to merge 7 commits into
json/native-navigationfrom
json/cache-benchmark
Draft

jasonhedman wants to merge 7 commits into
json/native-navigationfrom
json/cache-benchmark

Conversation

@jasonhedman

@jasonhedman jasonhedman commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

Disposable benchmark above #1186 comparing Redis, Next remote caching, and uncached reads against identical application queries on one preview deployment. Keep this PR unmerged.

The preview-only endpoint requires a dedicated token. Both caches store complete payloads under isolated benchmark keys; responses expose measurement metadata only. Scoped instrumentation counts query attempts without logging SQL, parameters, or returned data. The runner is bounded to 300 requests with concurrency 20; the log exporter paginates and deduplicates platform records.

The Redis mode now calls the application's minimal helper directly, replacing the old copied wrapper. It uses only expiring cache-benchmark:v2:* keys and fails if Redis is unavailable. The existing branch-only Redis override remains; production/other preview settings and Neon configuration were not changed.

The new run on commit ec58a8d / deployment dpl_CZDmy7UvuH6URcC9FDZuBFCTHdFv passed all 300 requests with matching payload digests. Logs verified 5 database attempts for Redis, 89 for Next, and 125 uncached across 100 requests per mode. Redis collapsed each twenty-request cold burst into one origin execution; Next performed 17–18. Both caches reused warm results. All 175 returned origin execution IDs matched logs, with no additional unreturned work or missing completions. A separate local Redis test also coalesced twenty 40-second reads into one execution, exercising lease renewal with real Lua scripts.

Results and historical comparisons are in docs/experiments/cache-benchmark.md and the adjacent aggregate JSON files. The deployed run does not establish billing, production capacity, refresh/expiry behavior, or cross-deployment persistence. Raw logs and credentials are not committed.

Validation: full pnpm check passes on every updated stack layer and this experiment. The application production build and benchmark preview build pass. Cleanup: drop this PR, remove its branch-scoped CACHE_BENCHMARK_TOKEN/REDIS_DISABLE overrides and preview deployments; benchmark keys expire after thirty minutes.

@jasonhedman
jasonhedman added this pull request to stack #1128 September 14, 2026 13:51
@vercel

vercel Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
x402scan Ready Ready Preview Sep 25, 2026 4:19pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — f2871a8a Deployed Sep 25, 2026 by vercel[bot]
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