← Back to all briefs
Architecture60s read

Next.js Middleware Now Runs on Fluid Compute, Full Node.js, Not Edge

Middleware is no longer constrained to the Edge runtime subset. Fluid Compute gives you the full Node.js API surface while keeping the same global latency profile. Auth, feature flags, and geo-routing just got simpler.

Next.js middleware has graduated from the Edge runtime. With Fluid Compute, your middleware now runs on full Node.js, same global regions, same pricing, zero runtime restrictions.

What was wrong with Edge middleware

Edge functions ran on a limited JavaScript subset. You couldn't:

What Fluid Compute changes

Fluid Compute runs standard Node.js in Vercel's edge network. Your middleware gets:

Real-world impact

Auth

// Now works in middleware:
import { jwtVerify } from 'jose' // uses Node crypto
const { payload } = await jwtVerify(token, secret)

Feature flags

// AsyncLocalStorage for request-scoped context:
import { AsyncLocalStorage } from 'node:async_hooks'

Geo-routing

// Access the full geo object, no Edge-specific APIs:
const country = request.geo?.country

The migration

If you're on Edge middleware today: your existing code keeps working. Fluid Compute is a superset. If you're starting fresh: write standard Node.js, no special runtime knowledge needed.