Skip to content

fix(cloudflare): restore bounded probe scheduling - #3171

Draft
james-elicx wants to merge 6 commits into
codex/cdn-v2-performancefrom
codex/cdn-v2-probe-worker-pool
Draft

fix(cloudflare): restore bounded probe scheduling#3171
james-elicx wants to merge 6 commits into
codex/cdn-v2-performancefrom
codex/cdn-v2-probe-worker-pool

Conversation

@james-elicx

@james-elicx james-elicx commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

Experimental top-of-stack change to test whether the cacheability probe coordinator caused the large-app performance regression.

  • restores fixed-size worker loops matching the scheduler used on main and by CDN warming
  • resolves route-moving paths before pattern pruning remains possible
  • preserves one cacheability probe per concrete path and the existing HTML/RSC warm request plan
  • does not change Worker entrypoints, cache admission, request headers, or rendering

Test plan

  • vp test run tests/cloudflare-cacheability-probe.test.ts tests/cloudflare-cdn-warm-deploy.test.ts
  • vp check packages/cloudflare/src/cacheability-probe.ts tests/cloudflare-cacheability-probe.test.ts
  • compare Node.js app probe duration at --warm-cdn-concurrency=25 and 100 against PR fix(cloudflare): reduce staged CDN probe work #3168 and main

@pkg-pr-new

pkg-pr-new Bot commented Sep 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vinext/cloudflare@3171
npm i https://pkg.pr.new/create-vinext-app@3171
npm i https://pkg.pr.new/@vinext/types@3171
npm i https://pkg.pr.new/vinext@3171

commit: d56c1ec

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared d56c1ec against base 1e487f2 using alternating same-runner rounds. Next.js was unchanged and skipped.

0 improved · 0 regressed · 6 within ±1.5%

Scenario Framework Baseline Current Change
Client bundle size (gzip) vinext 142.4 KB 142.4 KB ⚫ -0.0%
Client entry size (gzip) vinext 129.7 KB 129.7 KB ⚫ -0.0%
Dev server cold start vinext 3.26 s 3.22 s ⚫ -1.4%
Production build time vinext 3.55 s 3.54 s ⚫ -0.2%
RSC entry closure size (gzip) vinext 125.5 KB 125.4 KB ⚫ -0.0%
Server bundle size (gzip) vinext 216.1 KB 216.1 KB ⚫ -0.0%

View detailed results and traces

🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor
Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original
workers-cache preview production
static-export preview production
web preview production

@james-elicx
james-elicx force-pushed the codex/cdn-v2-probe-worker-pool branch 5 times, most recently from 9ce781e to dddf36f Compare September 7, 2026 10:16
@james-elicx
james-elicx force-pushed the codex/cdn-v2-probe-worker-pool branch from dddf36f to 0b9049d Compare September 7, 2026 10:29
@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Please complete this review within 8 minutes. Review the exact current head and report only actionable in-scope findings.

return;
return "done";
}
if (result.state === "probe-failed" && result.retryable === true && attemptOptions.deferRetry) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Do not reset the no-progress deadline for deferred failures

This branch is reached only after lastProgressAt was reset at line 628. Since every outer retry invokes classifyConcretePath again, repeated retryable responses keep extending warmCdnProbeTimeout even though no cacheability probe completed. For example, one always-503 target with phaseTimeoutMs: 25, retries: 60, and retryDelayMs: 10 runs through the retry budget instead of aborting after roughly 25ms. Move the progress update after this retry branch (or otherwise update it only for completed classifications) so the documented no-progress bound remains effective.

@ask-bonk

ask-bonk Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Posted 1 actionable inline finding. Focused tests passed.

github run

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