feat(cloudflare): prewarm canonical RSC navigation requests - #2784
feat(cloudflare): prewarm canonical RSC navigation requests#2784james-elicx wants to merge 68 commits into
Conversation
commit: |
|
Performance benchmarksCompared 0 improved · 3 regressed · 3 within ±1.5%
View detailed results and traces 🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head |
…warm # Conflicts: # tests/cloudflare-cdn-cache.test.ts
|
/bigbonk review for issues |
|
@james-elicx Bonk workflow was cancelled. View workflow run · To retry, trigger Bonk again. |
|
/bigbonk review for issues |
|
/bigbonk review for issues |
|
/bigbonk review for issues |
|
/bigbonk review for issues |
|
/bigbonk review for issues |
|
/bigbonk review for issues |
|
/bigbonk review for issues |
|
/bigbonk review for issues |
|
/bigbonk review for issues |
|
/bigbonk review for issues |
|
/bigbonk review for issues |
|
Superseded by #3002, an independent implementation based on current main with final-ISR eligibility and deployed browser/cache-reuse coverage. |
Summary
Varyverbatim, plus adapter-ownedVaryfields that deploy warmers can reproduce; Cloudflare declaresX-Forwarded-Protowithout putting Cloudflare-specific policy in core vinext?_rsc,RSC: 1,Accept: text/x-component, and no source/router-state reuse headersrouter.prefetch(), soft navigation, and deploy prewarming share that identity, including after an intercepted navigation; a completed prefetch is reused instead of issuing a second RSC request_rsc,Next-Url, router state, mounted slots, and interception context remain available where response selection needs themVarymetadata; fail closed for private/no-store responses, cookies, redirects, unsafeVary, middleware/config effects, or incomplete source-independence proofHost, and Cloudflare's overwrittenX-Forwarded-Proto; HTML does not vary onAccept__vinext_html/__vinext_rscfamily tags across allVaryvariants, hosts, and schemes so tag/path invalidation purges the whole representation family as required by Workers Cacheworkers_dev, basePath, trailingSlash, and deployment ID; wildcard hosts cannot be enumerated and exact non-wildcard routes intentionally cannot receive query-bearing RSC/probe requestsRequest and behavior implications
Next-Url,Next-Router-State-Tree, prefetch/segment-prefetch, mounted-slot, and interception headers. Their completed payload is proven source-independent, so those headers would only fragment the shared cache.CookieandAuthorizationrequests remainno-store/isolated.Hostand scheme are explicitVarydimensions because Workers Cache's base key is path/query/version rather than hostname or protocol.Varyfamily.Validation
vp run vinext#buildvp run @vinext/cloudflare#buildknip, and diff checks are clean/bigbonk: no remaining blockers; one timeout/body-drain finding was fixed and independently re-reviewed clean