Skip to content

refactor(nitro): use nitro v3 functionRules workflow routes#1575

Open
RihanArfan wants to merge 10 commits into
mainfrom
feat/nitro-builder-improvement
Open

refactor(nitro): use nitro v3 functionRules workflow routes#1575
RihanArfan wants to merge 10 commits into
mainfrom
feat/nitro-builder-improvement

Conversation

@RihanArfan
Copy link
Copy Markdown
Member

@RihanArfan RihanArfan commented Apr 1, 2026

Description

Currently we separately build the Workflows functions for the Vercel Build Output API when deploying a Nitro app to Vercel. This means the Workflows routes aren't part of the Nitro bundle.

This PR changes to now handle the Workflows routes as handlers within Nitro v3. Nitro v2 is untouched.

How did you test your changes?

Locally ran nitro dev in the nitro-v3 workspace and visited the API route POST /api/test-direct-step-call.

PR Checklist - Required to merge

  • 📦 pnpm changeset was run to create a changelog for this PR
    • During beta, we only use "patch" mode for changes. Don't tag minor/major versions.
    • Use pnpm changeset --empty if you are changing documentation or workbench apps
  • 🔒 DCO sign-off passes (run git commit --signoff on your commits)
  • 📝 Ping @vercel/workflow in a comment once the PR is ready, and the above checklist is complete

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 1, 2026

⚠️ No Changeset found

Latest commit: 816b4fc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 1, 2026

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

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment May 19, 2026 1:32pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment May 19, 2026 1:32pm
example-workflow Ready Ready Preview, Comment May 19, 2026 1:32pm
workbench-astro-workflow Ready Ready Preview, Comment May 19, 2026 1:32pm
workbench-express-workflow Ready Ready Preview, Comment May 19, 2026 1:32pm
workbench-fastify-workflow Ready Ready Preview, Comment May 19, 2026 1:32pm
workbench-hono-workflow Ready Ready Preview, Comment May 19, 2026 1:32pm
workbench-nitro-workflow Ready Ready Preview, Comment May 19, 2026 1:32pm
workbench-nuxt-workflow Ready Ready Preview, Comment May 19, 2026 1:32pm
workbench-sveltekit-workflow Ready Ready Preview, Comment May 19, 2026 1:32pm
workbench-tanstack-start-workflow Ready Ready Preview, Comment May 19, 2026 1:32pm
workbench-vite-workflow Ready Ready Preview, Comment May 19, 2026 1:32pm
workflow-docs Ready Ready Preview, Comment, Open in v0 May 19, 2026 1:32pm
workflow-swc-playground Ready Ready Preview, Comment May 19, 2026 1:32pm
workflow-tarballs Ready Ready Preview, Comment May 19, 2026 1:32pm
workflow-web Ready Ready Preview, Comment May 19, 2026 1:32pm

Comment thread packages/nitro/src/index.ts
@RihanArfan RihanArfan force-pushed the feat/nitro-builder-improvement branch from e312e97 to 3eb081a Compare April 7, 2026 10:28
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 0.032s (-26.9% 🟢) 1.006s (~) 0.974s 10 1.00x
💻 Local Express 0.033s (-26.4% 🟢) 1.006s (~) 0.974s 10 1.03x
💻 Local Next.js (Turbopack) 0.041s 1.004s 0.963s 10 1.30x
🐘 Postgres Nitro 0.050s (-47.3% 🟢) 1.012s (-3.0%) 0.962s 10 1.59x
🐘 Postgres Express 0.051s (-11.9% 🟢) 1.012s (~) 0.961s 10 1.62x
🐘 Postgres Next.js (Turbopack) 0.058s 1.012s 0.954s 10 1.84x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 0.286s (+21.6% 🔺) 2.676s (+25.3% 🔺) 2.389s 10 1.00x
▲ Vercel Nitro 0.299s (-27.0% 🟢) 2.349s (-6.4% 🟢) 2.050s 10 1.04x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.073s (-5.1% 🟢) 2.006s (~) 0.933s 10 1.00x
💻 Local Express 1.079s (-4.1%) 2.008s (~) 0.928s 10 1.01x
🐘 Postgres Nitro 1.081s (-5.2% 🟢) 2.010s (~) 0.929s 10 1.01x
💻 Local Next.js (Turbopack) 1.089s 2.005s 0.915s 10 1.02x
🐘 Postgres Express 1.092s (-4.7%) 2.010s (~) 0.918s 10 1.02x
🐘 Postgres Next.js (Turbopack) 1.133s 2.011s 0.878s 10 1.06x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.625s (-58.3% 🟢) 3.442s (-41.7% 🟢) 1.817s 10 1.00x
▲ Vercel Express 1.756s (-6.4% 🟢) 3.871s (+1.7%) 2.115s 10 1.08x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 10.399s (-4.3%) 11.014s (~) 0.615s 3 1.00x
💻 Local Nitro 10.410s (-4.9%) 11.024s (~) 0.614s 3 1.00x
🐘 Postgres Express 10.430s (-4.9%) 11.017s (~) 0.587s 3 1.00x
💻 Local Express 10.442s (-4.4%) 11.023s (~) 0.581s 3 1.00x
💻 Local Next.js (Turbopack) 10.547s 11.020s 0.473s 3 1.01x
🐘 Postgres Next.js (Turbopack) 10.741s 11.020s 0.279s 3 1.03x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 13.572s (-20.1% 🟢) 15.259s (-23.8% 🟢) 1.687s 2 1.00x
▲ Vercel Nitro 13.782s (-41.9% 🟢) 15.454s (-38.5% 🟢) 1.672s 2 1.02x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 13.493s (-7.6% 🟢) 14.016s (-6.7% 🟢) 0.524s 5 1.00x
💻 Local Nitro 13.497s (-10.4% 🟢) 14.028s (-12.5% 🟢) 0.530s 5 1.00x
🐘 Postgres Express 13.508s (-7.4% 🟢) 14.018s (-6.7% 🟢) 0.510s 5 1.00x
💻 Local Express 13.511s (-9.7% 🟢) 14.027s (-6.7% 🟢) 0.516s 5 1.00x
💻 Local Next.js (Turbopack) 13.758s 14.025s 0.267s 5 1.02x
🐘 Postgres Next.js (Turbopack) 14.159s 15.016s 0.857s 4 1.05x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 21.549s (-57.2% 🟢) 23.927s (-54.5% 🟢) 2.377s 3 1.00x
▲ Vercel Nitro 21.646s (-66.4% 🟢) 23.456s (-64.8% 🟢) 1.810s 3 1.00x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 11.894s (-29.1% 🟢) 12.147s (-28.7% 🟢) 0.253s 8 1.00x
💻 Local Express 11.933s (-28.1% 🟢) 12.022s (-29.4% 🟢) 0.089s 8 1.00x
🐘 Postgres Nitro 11.949s (-14.4% 🟢) 12.268s (-14.3% 🟢) 0.319s 8 1.00x
🐘 Postgres Express 11.966s (-14.6% 🟢) 12.013s (-17.7% 🟢) 0.047s 8 1.01x
💻 Local Next.js (Turbopack) 12.377s 13.021s 0.644s 7 1.04x
🐘 Postgres Next.js (Turbopack) 13.252s 14.016s 0.764s 7 1.11x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 36.274s (-91.4% 🟢) 40.279s (-90.5% 🟢) 4.005s 3 1.00x
▲ Vercel Express 38.206s (-68.5% 🟢) 40.619s (-67.2% 🟢) 2.413s 3 1.05x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.136s (-10.9% 🟢) 2.006s (~) 0.871s 15 1.00x
🐘 Postgres Express 1.159s (-8.1% 🟢) 2.008s (~) 0.849s 15 1.02x
💻 Local Nitro 1.184s (-27.4% 🟢) 2.006s (-3.3%) 0.822s 15 1.04x
💻 Local Express 1.191s (-20.0% 🟢) 2.007s (~) 0.816s 15 1.05x
🐘 Postgres Next.js (Turbopack) 1.217s 2.008s 0.791s 15 1.07x
💻 Local Next.js (Turbopack) 1.279s 2.005s 0.726s 15 1.13x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.454s (-14.2% 🟢) 4.165s (-9.9% 🟢) 1.711s 8 1.00x
▲ Vercel Nitro 2.663s (-5.5% 🟢) 4.403s (+1.9%) 1.740s 7 1.09x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.204s (-49.0% 🟢) 2.007s (-33.3% 🟢) 0.802s 15 1.00x
🐘 Postgres Nitro 1.205s (-48.8% 🟢) 2.009s (-33.2% 🟢) 0.804s 15 1.00x
🐘 Postgres Next.js (Turbopack) 1.361s 2.008s 0.648s 15 1.13x
💻 Local Next.js (Turbopack) 1.601s 2.008s 0.407s 15 1.33x
💻 Local Nitro 1.765s (-43.9% 🟢) 2.006s (-48.4% 🟢) 0.241s 15 1.47x
💻 Local Express 2.054s (-30.4% 🟢) 2.393s (-30.7% 🟢) 0.338s 13 1.71x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.647s (+0.8%) 5.597s (+9.5% 🔺) 1.950s 6 1.00x
▲ Vercel Nitro 4.614s (+13.9% 🔺) 6.369s (+7.6% 🔺) 1.755s 6 1.26x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.309s (-62.5% 🟢) 2.008s (-49.9% 🟢) 0.699s 15 1.00x
🐘 Postgres Nitro 1.315s (-62.2% 🟢) 2.009s (-49.9% 🟢) 0.694s 15 1.00x
🐘 Postgres Next.js (Turbopack) 1.637s 2.007s 0.370s 15 1.25x
💻 Local Next.js (Turbopack) 3.976s 4.581s 0.605s 7 3.04x
💻 Local Nitro 4.986s (-40.3% 🟢) 5.513s (-38.9% 🟢) 0.527s 6 3.81x
💻 Local Express 5.737s (-31.2% 🟢) 6.414s (-28.9% 🟢) 0.678s 5 4.38x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 5.535s (+57.0% 🔺) 7.166s (+29.5% 🔺) 1.631s 5 1.00x
▲ Vercel Express 6.891s (+62.5% 🔺) 9.247s (+50.9% 🔺) 2.356s 4 1.25x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.140s (-9.3% 🟢) 2.008s (~) 0.868s 15 1.00x
🐘 Postgres Express 1.156s (-8.1% 🟢) 2.009s (~) 0.854s 15 1.01x
🐘 Postgres Next.js (Turbopack) 1.214s 2.007s 0.793s 15 1.07x
💻 Local Next.js (Turbopack) 1.275s 2.005s 0.730s 15 1.12x
💻 Local Nitro 1.420s (-23.9% 🟢) 2.006s (-14.3% 🟢) 0.586s 15 1.25x
💻 Local Express 1.451s (-23.4% 🟢) 2.007s (-15.1% 🟢) 0.556s 15 1.27x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.543s (-1.5%) 4.192s (-3.6%) 1.649s 8 1.00x
▲ Vercel Nitro 2.573s (+4.7%) 3.991s (-4.3%) 1.417s 8 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.203s (-48.6% 🟢) 2.010s (-33.2% 🟢) 0.807s 15 1.00x
🐘 Postgres Express 1.214s (-48.2% 🟢) 2.008s (-33.3% 🟢) 0.794s 15 1.01x
🐘 Postgres Next.js (Turbopack) 1.343s 2.009s 0.666s 15 1.12x
💻 Local Next.js (Turbopack) 1.812s 2.148s 0.337s 14 1.51x
💻 Local Nitro 1.931s (-37.0% 🟢) 2.393s (-38.4% 🟢) 0.462s 13 1.61x
💻 Local Express 2.199s (-29.8% 🟢) 2.676s (-28.9% 🟢) 0.477s 12 1.83x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.162s (-1.0%) 5.149s (+7.4% 🔺) 1.987s 6 1.00x
▲ Vercel Nitro 4.021s (+24.4% 🔺) 5.763s (+13.5% 🔺) 1.742s 6 1.27x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.312s (-62.3% 🟢) 2.007s (-49.9% 🟢) 0.695s 15 1.00x
🐘 Postgres Express 1.322s (-62.2% 🟢) 2.008s (-49.9% 🟢) 0.686s 15 1.01x
🐘 Postgres Next.js (Turbopack) 1.613s 2.008s 0.394s 15 1.23x
💻 Local Next.js (Turbopack) 4.263s 4.725s 0.462s 7 3.25x
💻 Local Nitro 5.541s (-39.4% 🟢) 6.013s (-40.0% 🟢) 0.473s 6 4.22x
💻 Local Express 5.805s (-34.0% 🟢) 6.213s (-33.0% 🟢) 0.409s 5 4.42x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 5.529s (-13.8% 🟢) 7.229s (-11.6% 🟢) 1.699s 5 1.00x
▲ Vercel Nitro 8.325s (+63.5% 🔺) 10.338s (+51.7% 🔺) 2.014s 3 1.51x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.463s (-43.6% 🟢) 1.008s (~) 0.545s 60 1.00x
💻 Local Nitro 0.485s (-50.6% 🟢) 1.021s (-6.7% 🟢) 0.536s 59 1.05x
💻 Local Express 0.491s (-50.1% 🟢) 1.004s (-6.7% 🟢) 0.513s 60 1.06x
🐘 Postgres Express 0.494s (-41.1% 🟢) 1.007s (-1.6%) 0.513s 60 1.07x
💻 Local Next.js (Turbopack) 0.622s 1.007s 0.385s 60 1.34x
🐘 Postgres Next.js (Turbopack) 0.673s 1.006s 0.333s 60 1.45x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 5.032s (-73.5% 🟢) 6.986s (-67.3% 🟢) 1.954s 9 1.00x
▲ Vercel Nitro 5.124s (-76.8% 🟢) 6.866s (-71.4% 🟢) 1.742s 9 1.02x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.088s (-43.6% 🟢) 1.674s (-20.3% 🟢) 0.586s 54 1.00x
🐘 Postgres Express 1.092s (-44.8% 🟢) 1.808s (-19.9% 🟢) 0.716s 50 1.00x
💻 Local Nitro 1.212s (-60.1% 🟢) 2.006s (-46.6% 🟢) 0.794s 45 1.11x
💻 Local Express 1.241s (-58.9% 🟢) 2.006s (-44.1% 🟢) 0.765s 45 1.14x
💻 Local Next.js (Turbopack) 1.562s 2.027s 0.465s 45 1.44x
🐘 Postgres Next.js (Turbopack) 1.643s 2.008s 0.365s 45 1.51x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 13.108s (-62.0% 🟢) 15.491s (-57.9% 🟢) 2.382s 6 1.00x
▲ Vercel Nitro 14.213s (-64.0% 🟢) 15.889s (-61.5% 🟢) 1.676s 6 1.08x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.998s (-51.3% 🟢) 2.427s (-47.3% 🟢) 0.429s 50 1.00x
🐘 Postgres Express 2.221s (-44.3% 🟢) 2.959s (-32.3% 🟢) 0.738s 41 1.11x
💻 Local Nitro 2.689s (-71.1% 🟢) 3.033s (-69.7% 🟢) 0.343s 40 1.35x
💻 Local Express 2.841s (-69.2% 🟢) 3.192s (-68.1% 🟢) 0.352s 38 1.42x
🐘 Postgres Next.js (Turbopack) 3.167s 4.009s 0.842s 30 1.59x
💻 Local Next.js (Turbopack) 3.370s 4.074s 0.704s 30 1.69x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 38.646s (-60.1% 🟢) 40.882s (-58.5% 🟢) 2.235s 3 1.00x
▲ Vercel Express 41.732s (-67.9% 🟢) 43.918s (-66.8% 🟢) 2.187s 3 1.08x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.178s (-37.2% 🟢) 1.006s (~) 0.828s 60 1.00x
🐘 Postgres Express 0.206s (-27.2% 🟢) 1.006s (~) 0.801s 60 1.16x
🐘 Postgres Next.js (Turbopack) 0.232s 1.006s 0.774s 60 1.30x
💻 Local Nitro 0.419s (-30.8% 🟢) 1.004s (-1.7%) 0.586s 60 2.35x
💻 Local Express 0.460s (-17.9% 🟢) 1.005s (~) 0.544s 60 2.59x
💻 Local Next.js (Turbopack) 0.472s 1.003s 0.532s 60 2.65x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.458s (+48.0% 🔺) 3.885s (+15.9% 🔺) 1.428s 16 1.00x
▲ Vercel Express 78.756s (+3930.0% 🔺) 80.568s (+2115.2% 🔺) 1.812s 4 32.04x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.293s (-41.0% 🟢) 1.006s (~) 0.713s 90 1.00x
🐘 Postgres Express 0.324s (-36.5% 🟢) 1.006s (~) 0.682s 90 1.10x
🐘 Postgres Next.js (Turbopack) 0.445s 1.007s 0.562s 90 1.52x
💻 Local Next.js (Turbopack) 1.869s 2.441s 0.572s 37 6.38x
💻 Local Nitro 2.159s (-14.9% 🟢) 3.009s (~) 0.850s 30 7.37x
💻 Local Express 2.204s (-12.3% 🟢) 3.009s (~) 0.806s 30 7.52x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 8.698s (+169.6% 🔺) 10.430s (+116.3% 🔺) 1.732s 9 1.00x
▲ Vercel Express 10.293s (+237.9% 🔺) 12.448s (+158.9% 🔺) 2.155s 8 1.18x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.606s (-23.3% 🟢) 1.006s (~) 0.400s 120 1.00x
🐘 Postgres Express 0.667s (-18.6% 🟢) 1.006s (-1.1%) 0.340s 120 1.10x
🐘 Postgres Next.js (Turbopack) 0.888s 1.059s 0.171s 114 1.46x
💻 Local Next.js (Turbopack) 8.730s 9.406s 0.676s 13 14.39x
💻 Local Nitro 10.019s (-10.5% 🟢) 10.612s (-9.0% 🟢) 0.593s 12 16.52x
💻 Local Express 10.413s (-6.9% 🟢) 10.938s (-8.4% 🟢) 0.525s 11 17.17x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 24.988s (+223.6% 🔺) 27.352s (+191.0% 🔺) 2.364s 5 1.00x
▲ Vercel Express 26.363s (+255.3% 🔺) 28.507s (+208.4% 🔺) 2.144s 5 1.06x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.133s (+452.6% 🔺) 1.999s (+100.0% 🔺) 0.001s (-33.3% 🟢) 2.010s (+98.7% 🔺) 0.877s 10 1.00x
💻 Local Nitro 1.135s (+431.0% 🔺) 2.005s (+99.6% 🔺) 0.012s (-3.2%) 2.019s (+98.2% 🔺) 0.885s 10 1.00x
💻 Local Next.js (Turbopack) 1.138s 2.003s 0.008s 2.014s 0.877s 10 1.00x
💻 Local Express 1.139s (+472.2% 🔺) 2.006s (+99.7% 🔺) 0.012s (~) 2.020s (+98.4% 🔺) 0.881s 10 1.01x
🐘 Postgres Express 1.142s (+456.9% 🔺) 2.001s (+100.4% 🔺) 0.002s (-6.3% 🟢) 2.009s (+98.7% 🔺) 0.867s 10 1.01x
🐘 Postgres Next.js (Turbopack) 1.198s 2.002s 0.002s 2.011s 0.813s 10 1.06x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.252s (-41.2% 🟢) 3.244s (-38.5% 🟢) 2.042s (+175.2% 🔺) 5.754s (-11.2% 🟢) 3.502s 10 1.00x
▲ Vercel Express 2.391s (-4.6%) 3.464s (-15.3% 🟢) 13.937s (+1350.6% 🔺) 17.930s (+220.7% 🔺) 15.538s 10 1.06x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Nitro | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.513s (+142.5% 🔺) 2.001s (+98.8% 🔺) 0.004s (-2.5%) 2.026s (+98.1% 🔺) 0.512s 30 1.00x
🐘 Postgres Express 1.568s (+148.9% 🔺) 2.005s (+99.2% 🔺) 0.004s (+1.8%) 2.027s (+98.1% 🔺) 0.459s 30 1.04x
🐘 Postgres Next.js (Turbopack) 1.676s 2.010s 0.004s 2.025s 0.349s 30 1.11x
💻 Local Next.js (Turbopack) 1.708s 2.009s 0.008s 2.198s 0.490s 28 1.13x
💻 Local Nitro 1.712s (+104.1% 🔺) 2.011s (+98.7% 🔺) 0.009s (~) 2.202s (+97.3% 🔺) 0.490s 28 1.13x
💻 Local Express 1.774s (+134.3% 🔺) 2.013s (+95.7% 🔺) 0.010s (+4.7%) 2.204s (+112.0% 🔺) 0.430s 28 1.17x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 5.851s (-80.1% 🟢) 7.091s (-77.0% 🟢) 0.330s (+194.8% 🔺) 7.858s (-75.3% 🟢) 2.007s 8 1.00x
▲ Vercel Express 5.977s (-8.1% 🟢) 7.424s (-7.3% 🟢) 0.601s (+47.0% 🔺) 8.578s (-2.9%) 2.601s 7 1.02x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Nitro | Express

10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.640s (-34.0% 🟢) 1.015s (-18.6% 🟢) 0.000s (-59.3% 🟢) 1.025s (-18.5% 🟢) 0.385s 59 1.00x
🐘 Postgres Express 0.694s (-27.7% 🟢) 1.051s (-17.8% 🟢) 0.000s (-59.6% 🟢) 1.061s (-18.8% 🟢) 0.366s 57 1.09x
🐘 Postgres Next.js (Turbopack) 0.787s 1.072s 0.000s 1.078s 0.291s 56 1.23x
💻 Local Next.js (Turbopack) 1.218s 1.948s 0.001s 1.951s 0.733s 31 1.91x
💻 Local Nitro 1.321s (+8.0% 🔺) 2.016s (~) 0.000s (+133.3% 🔺) 2.018s (~) 0.697s 30 2.07x
💻 Local Express 1.331s (+8.6% 🔺) 2.015s (~) 0.000s (-40.0% 🟢) 2.017s (~) 0.686s 30 2.08x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.652s (+19.7% 🔺) 4.878s (+11.1% 🔺) 0.000s (+116.7% 🔺) 5.315s (+10.5% 🔺) 1.664s 12 1.00x
▲ Vercel Express 3.727s (~) 5.133s (+0.6%) 0.000s (+50.0% 🔺) 5.657s (+2.3%) 1.930s 11 1.02x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Nitro | Express

fan-out fan-in 10 streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.310s (-26.9% 🟢) 1.996s (-6.8% 🟢) 0.000s (-6.7% 🟢) 2.050s (-5.7% 🟢) 0.740s 30 1.00x
🐘 Postgres Express 1.451s (-18.1% 🟢) 2.138s (-1.8%) 0.000s (+Infinity% 🔺) 2.154s (-2.0%) 0.703s 28 1.11x
🐘 Postgres Next.js (Turbopack) 1.743s 2.311s 0.000s 2.318s 0.575s 26 1.33x
💻 Local Next.js (Turbopack) 2.337s 3.027s 0.000s 3.031s 0.694s 20 1.78x
💻 Local Nitro 2.957s (-12.7% 🟢) 3.613s (-10.4% 🟢) 0.000s (-11.8% 🟢) 3.619s (-10.3% 🟢) 0.662s 17 2.26x
💻 Local Express 3.110s (-10.3% 🟢) 3.841s (-4.8%) 0.001s (-37.5% 🟢) 3.844s (-4.8%) 0.735s 16 2.37x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 5.657s (+23.3% 🔺) 7.235s (+20.1% 🔺) 0.015s (+Infinity% 🔺) 7.772s (+20.4% 🔺) 2.115s 8 1.00x
▲ Vercel Nitro 5.927s (+44.8% 🔺) 7.079s (+31.7% 🔺) 0.000s (-100.0% 🟢) 7.601s (+31.2% 🔺) 1.674s 9 1.05x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Express | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Nitro 11/21
🐘 Postgres Nitro 19/21
▲ Vercel Express 11/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 🐘 Postgres 16/21
Next.js (Turbopack) 🐘 Postgres 13/21
Nitro 🐘 Postgres 18/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

🧪 E2E Test Results

All tests passed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 1200 0 219 1419
✅ 💻 Local Development 1587 0 219 1806
✅ 📦 Local Production 1587 0 219 1806
✅ 🐘 Local Postgres 1587 0 219 1806
✅ 🪟 Windows 129 0 0 129
✅ 📋 Other 727 0 176 903
Total 6817 0 1052 7869

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 103 0 26
✅ example 103 0 26
✅ express 103 0 26
✅ fastify 103 0 26
✅ hono 103 0 26
✅ nextjs-turbopack 127 0 2
✅ nextjs-webpack 127 0 2
✅ nitro 103 0 26
✅ nuxt 103 0 26
✅ sveltekit 122 0 7
✅ vite 103 0 26
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 104 0 25
✅ express-stable 104 0 25
✅ fastify-stable 104 0 25
✅ hono-stable 104 0 25
✅ nextjs-turbopack-canary 110 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 129 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 129 0 0
✅ nextjs-webpack-canary 110 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 129 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 129 0 0
✅ nitro-stable 104 0 25
✅ nuxt-stable 104 0 25
✅ sveltekit-stable 123 0 6
✅ vite-stable 104 0 25
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 104 0 25
✅ express-stable 104 0 25
✅ fastify-stable 104 0 25
✅ hono-stable 104 0 25
✅ nextjs-turbopack-canary 110 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 129 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 129 0 0
✅ nextjs-webpack-canary 110 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 129 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 129 0 0
✅ nitro-stable 104 0 25
✅ nuxt-stable 104 0 25
✅ sveltekit-stable 123 0 6
✅ vite-stable 104 0 25
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 104 0 25
✅ express-stable 104 0 25
✅ fastify-stable 104 0 25
✅ hono-stable 104 0 25
✅ nextjs-turbopack-canary 110 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 129 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 129 0 0
✅ nextjs-webpack-canary 110 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 129 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 129 0 0
✅ nitro-stable 104 0 25
✅ nuxt-stable 104 0 25
✅ sveltekit-stable 123 0 6
✅ vite-stable 104 0 25
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 129 0 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 104 0 25
✅ e2e-local-dev-tanstack-start- 104 0 25
✅ e2e-local-postgres-nest-stable 104 0 25
✅ e2e-local-postgres-tanstack-start- 104 0 25
✅ e2e-local-prod-nest-stable 104 0 25
✅ e2e-local-prod-tanstack-start- 104 0 25
✅ e2e-vercel-prod-tanstack-start 103 0 26

📋 View full workflow run

Comment thread packages/nitro/src/index.ts Outdated
@RihanArfan
Copy link
Copy Markdown
Member Author

@vercel/workflow

Copy link
Copy Markdown
Member

@VaguelySerious VaguelySerious left a comment

Choose a reason for hiding this comment

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

You probably know better than me whether the nits apply, so use your judgement there. Happy to approve this once the e2e tests are running again and CI is green

Copy link
Copy Markdown
Member

@VaguelySerious VaguelySerious left a comment

Choose a reason for hiding this comment

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

AI review: blocking issues found

Comment thread packages/nitro/src/index.ts
Comment thread packages/nitro/src/index.ts
Comment thread packages/nitro/src/index.ts Outdated
Comment thread packages/nitro/src/index.ts Outdated
Comment thread packages/nitro/src/index.ts Outdated
Comment thread packages/nitro/src/index.ts Outdated
Comment thread packages/nitro/src/index.test.ts
Comment thread packages/builders/src/types.ts Outdated
* Extra esbuild options merged into every bundle this builder produces
* (steps, intermediate workflow, final workflow wrapper, webhook).
*/
esbuildOptions?: Partial<BuildOptions>;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Nit

esbuildOptions: Partial<BuildOptions> is a broad surface for one knob

The new field accepts the full esbuild BuildOptions and is spread into four bundle calls with very different needs (steps: node/esm, workflow VM: neutral/cjs, webhook: node/esm, final wrapper: node/esm). The current spread order puts user options first so builder-required options like platform, format, bundle, plugins win — that's defensive — but the API still implies "you can pass any esbuild option" when in practice almost everything that matters is overridden.

Given the only consumer is sourcesContent: false, consider either narrowing the public type to a small allowlist or naming the field something closer to its actual purpose. Not blocking, but the surface area will be hard to take back later.

@VaguelySerious
Copy link
Copy Markdown
Member

Seems like tests are still failing, please re-ping me when they pass 👋

@RihanArfan
Copy link
Copy Markdown
Member Author

Hey @VaguelySerious, the related tests are passing 🥳

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 13, 2026

Deployment failed with the following error:

The Preview Deployment Suffix domain "labs.vercel.dev" is not available under the current scope. Learn more: https://vercel.link/3a1

@RihanArfan
Copy link
Copy Markdown
Member Author

@vercel/workflow

Copy link
Copy Markdown
Member

@VaguelySerious VaguelySerious left a comment

Choose a reason for hiding this comment

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

AI review: no blocking issues

};

if (runtime) {
const webhookPath = '/.well-known/workflow/v1/webhook/**';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Note

The webhook handler is registered at /.well-known/workflow/v1/webhook/:token (line 214), but this functionRules key uses webhook/**. I built workbench/nitro-v3 with NITRO_PRESET=vercel and workflow.runtime: 'nodejs22.x' and verified that nitro's vercel preset generates two function dirs in this case:

  • webhook/[token].func — created via routeFuncRouter.match against the :token route, gets the runtime override.
  • webhook/[...].func — created from this ** rule, also gets the runtime override.

In config.json, the webhook/(?:.*) route emitted by this rule comes before webhook/(?<token>[^/]+), so [token].func ends up unreachable. The result is a wasted function dir (extra disk/build/deploy size) and slightly looser routing (/webhook/ with no token now matches).

Suggested fix: use the same pattern as the handler, e.g. '/.well-known/workflow/v1/webhook/:token'. With matching keys, nitro reuses the single funcDir under the runtime override.

// V2 combined: a single trigger covers both `__wkf_workflow_*`
// (workflow orchestration) and `__wkf_step_*` (step execution),
// since the same handler dispatches both.
experimentalTriggers: [WORKFLOW_QUEUE_TRIGGER],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Note

The comment two lines above says "merged with any user-defined rules at the same paths so explicit user config (e.g. memory) is preserved", but the spread order here (user first, then maxDuration / experimentalTriggers) means workflow's values always win. Only fields that workflow doesn't touch (like memory) survive — user-set maxDuration, runtime, or additional experimentalTriggers get clobbered.

Two small things:

  1. The comment should match the behavior — something like "workflow's required triggers/maxDuration take precedence; unrelated fields like memory are preserved."
  2. Other integrations (e.g. packages/sveltekit) concatenate user triggers rather than replacing them. Probably not an issue in practice since this is a workflow-owned route, but worth deciding deliberately.

Also (related): also exercised by the E2E Vercel Prod Tests (hono) job, which currently fails on maxRetries=0 disables retries (60s timeout) on this PR while passing on main. And E2E Local Prod Tests (tanstack-start) fails on abortVoidSleepTimeoutWorkflow (also passes on main). Both look like potential regressions worth investigating before merge — they aren't in the known-flaky set.

if (runtime) {
const webhookPath = '/.well-known/workflow/v1/webhook/**';
rules[webhookPath] = { ...rules[webhookPath], runtime };
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Note

runtime is propagated to the flow and webhook routes but not to the manifest route (/.well-known/workflow/v1/manifest.json, registered via addManifestHandler). If a user picks a non-default runtime, the manifest gets served from the catch-all __server function on the default runtime. Low impact (manifest is static JSON), but inconsistent — worth either documenting why it's intentionally excluded, or applying the same override.

return majorVersion === 2;
}
return !nitro.routing;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Note

This PR adds non-trivial new logic (isNitroV2, the useLegacyVercelBuild branch, the functionRules merge) with no unit test coverage.

Also heads-up: the existing packages/nitro/src/index.test.ts is already broken on main (2 of 10 tests reference #workflow/steps.mjs, which no longer exists since the V1→V2 combined bundle change). Not introduced by this PR, but since the file is already touching the same area, fixing those tests and adding a couple of cases for isNitroV2 and the v3-vercel branch would be a low-cost addition.

*/
function getNitroStringExternals(nitro: Nitro): string[] | undefined {
const externals = nitro.options.externals?.external?.filter(
const external = (nitro.options as { externals?: { external?: unknown[] } })
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Nit

The structural cast widens external to unknown[] then filters strings — works, but a named alias would read better:

type NitroV2Options = { externals?: { external?: unknown[] } };
const external = (nitro.options as NitroV2Options).externals?.external;

Non-blocking.

// removed the `experimental.tsconfigPaths` opt-in in 3.0.260415-beta+.
resolve: {
alias: {
'@repo': fileURLToPath(new URL('../../', import.meta.url)),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Nit

I searched workbench/vite/ (including the symlinked workflows/ and plugins/ dirs) and didn't find any @repo/... imports. If the alias is preventative for future imports, fine — but if not, this can probably be dropped. Aliasing to the entire repo root is broad and a bit surprising for a workbench.

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.

3 participants