mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #933] Investigate App Router dynamic SSR performance against Platformatic benchmark #203
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#203
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NathanDrake2406 on GitHub (Apr 28, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/933
I saw this benchmark/tweet and tried benchmarking vinext. There are very clear improvement opportunities for us here.
What This Tests
The benchmark mostly tests dynamic page SSR under load.
For vinext/Next.js, that means:
It does not meaningfully test API routes, middleware, static assets, hydration, or client navigation.
Local Docker Harness
I added a local Docker Compose harness as a closer middle ground to the Platformatic setup:
This is still not apples-to-apples with Platformatic EKS. Docker Desktop shares CPU/networking with the load generator. Treat this as a local saturation signal, not publishable framework ranking.
Versions:
16.2.4, React19.2.57.14.2, React19.2.5, Vite8.0.101.167.50, TanStack Router1.168.25, React19.2.5, Vite8.0.10/Users/nathan/Projects/vinext, React19.2.5, Vite8.0.10Result: 1000 rps Baseline
One corrected baseline run at
1000 rps, 6 replicas, 120s measured duration:Interpretation:
1000 rpsis too easy for React Router, TanStack, and Next in this local harness. It already stresses vinext: completed requests return 200, but tail latency spikes and k6 drops scheduled iterations.Result: 2000 rps Saturation
Three corrected randomized-order runs at
2000 rps, 6 replicas, 120s measured duration:Randomized order:
Interpretation:
2000 rps.1.16k rpsin this local harness.975 rps, with worse tail latency and more dropped iterations.Harness files live in
.docker/anddocker-compose.local-bench.ymlin the local benchmark checkout.Likely vinext Bottleneck
The first suspicious vinext-specific cost is duplicate work in the dynamic App Router page path:
Files to inspect:
packages/vinext/src/server/app-page-render.ts- always callsprobeAppPageBeforeRender()before renderpackages/vinext/src/server/app-page-probe.ts- probes layouts and page before renderpackages/vinext/src/server/app-page-execution.ts- awaits async page probe results when no loading boundary existspackages/vinext/src/server/app-ssr-entry.ts- tees Flight and feeds SSR/html embeddingDone When
force-dynamicpage SSR if compatible.